Skip to content

Commit

Permalink
feat: add random query param value for avoid caching
Browse files Browse the repository at this point in the history
  • Loading branch information
beliven-fabrizio-gortani committed Dec 30, 2024
1 parent b079121 commit 7c87f01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ vendor="beliven-it"
repository_name="laravel-sync"
repository="$vendor/$repository_name"
archive_name="archive"

archive_path_folder="/tmp/$archive_name"
archive_path_zip="$archive_path_folder.zip"
random_key=$(shuf -i 1-100000 -n 1)

trap _cleanup EXIT

Expand All @@ -16,7 +16,7 @@ _cleanup() {
rm -rf $archive_path_folder
}

latest_release=$(curl -s https://api.github.com/repos/$repository/releases/latest | grep "$key_to_link" | cut -d '"' -f 4)
latest_release=$(curl -s "https://api.github.com/repos/$repository/releases/latest?key=$random_key" | grep "$key_to_link" | cut -d '"' -f 4)

if [ -n "$latest_release" ]; then
echo "Latest release: $latest_release"
Expand Down

0 comments on commit 7c87f01

Please sign in to comment.