Skip to content

Commit

Permalink
refactor(binaries): adapt binary publish fetch script (#1358)
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen authored Sep 12, 2024
1 parent eae6b0c commit f4a972e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions binaries/publish-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ set -eux

url="https://api.github.com/repos/prisma/prisma/releases/latest"

v=$(curl -s "$url" -H "Authorization: Bearer $GH_TOKEN" | jq -r .tag_name)
for i in {1..20}; do
i=1
while [ $i -le 20 ]; do
v=$(curl -s "$url" -H "Authorization: Bearer $GH_TOKEN" | jq -r .tag_name)
if [ "$v" != "null" ]; then
break
fi
v=$(curl -s "$url" -H "Authorization: Bearer $GH_TOKEN" | jq -r .tag_name)
sleep $i
i=$((i+1))
done

if [ "$v" = "null" ]; then
Expand Down

0 comments on commit f4a972e

Please sign in to comment.