Use dl link instead of release page in wait script

Use the download link instead of the release link in wait script as
release link becomes valid on tag creation before download is ready.
This commit is contained in:
GeckoEidechse 2023-11-02 13:09:38 +01:00
parent c829a40caa
commit d6d2dfe47d
1 changed files with 3 additions and 3 deletions

View File

@ -6,14 +6,14 @@ if [ -z "$1" ]; then
exit 1
fi
url="https://github.com/R2Northstar/NorthstarLauncher/releases/tag/$1"
url="https://github.com/R2Northstar/NorthstarLauncher/releases/download/$1/northstar-launcher.zip"
wait_time_seconds=60
# Loop until the response code changes
while true; do
response=$(curl --silent --output /dev/null --write-out "%{http_code}" $url)
if [ $response -ne 200 ]; then
echo "Response is not 200. Retrying in $wait_time_seconds seconds."
if [ $response -eq 404 ]; then
echo "Response is 404. Retrying in $wait_time_seconds seconds."
sleep $wait_time_seconds
else
echo "Site is accessible with response code $response."