Skip to content

Commit

Permalink
chore: remove cache from curl
Browse files Browse the repository at this point in the history
  • Loading branch information
filipe1309 committed Jan 5, 2022
1 parent 66d201c commit 1dd0e2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .shub/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ JSON_TEMPLATE='{
sed -i '' -e "s/{{ VERSION }}/$VERSION/g" README.md

# Create version file
curl -o .shub/latest-release.json --create-dirs https://api.github.com/repos/filipe1309/shubcogen-template/releases/latest 2>/dev/null
curl -o .shub/latest-release.json --create-dirs https://api.github.com/repos/filipe1309/shubcogen-template/releases/latest -H 'Cache-Control: no-cache' 2>/dev/null
LATEST_RELEASE="$(cat .shub/latest-release.json)"
REMOTE_VERSION=$(parse_json "$LATEST_RELEASE" tag_name)
rm .shub/latest-release.json
Expand Down
4 changes: 2 additions & 2 deletions .shub/self-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source .shub/colors.sh

LOCAL_VERSION=$(head -n 1 .shub/version)

curl -o .shub/latest-release.json --create-dirs https://api.github.com/repos/filipe1309/shubcogen-template/releases/latest 2>/dev/null
curl -o .shub/latest-release.json --create-dirs https://api.github.com/repos/filipe1309/shubcogen-template/releases/latest -H 'Cache-Control: no-cache' 2>/dev/null
LATEST_RELEASE="$(cat .shub/latest-release.json)"
REMOTE_VERSION=$(parse_json "$LATEST_RELEASE" tag_name)
rm .shub/latest-release.json
Expand All @@ -18,7 +18,7 @@ if [ "$REMOTE_VERSION" != "$LOCAL_VERSION" ]; then
response=$(echo "$response" | tr '[:upper:]' '[:lower:]') # tolower
if [[ $response =~ ^(yes|y| ) ]] || [[ -z $response ]]; then
echo "🔄 Updating..."
curl -o .shub/links.txt --create-dirs https://raw.githubusercontent.com/filipe1309/shubcogen-template/main/.shub/links.txt --progress-bar
curl -o .shub/links.txt --create-dirs https://raw.githubusercontent.com/filipe1309/shubcogen-template/main/.shub/links.txt --progress-bar -H 'Cache-Control: no-cache'
cat .shub/links.txt | while read CMD; do curl -o $(echo ".shub/$(basename $CMD) --create-dirs $CMD") --progress-bar; done;
chmod -R +x .shub/*.sh

Expand Down

0 comments on commit 1dd0e2d

Please sign in to comment.