Skip to content
Permalink
Browse files

Rework retry against Github API

  • Loading branch information...
frzb committed Feb 13, 2019
1 parent 8b8d756 commit f10b371b969728085969fe0db591bd64f063016e
Showing with 6 additions and 4 deletions.
  1. +6 −4 docker/coinboot-download-helper
@@ -30,12 +30,14 @@ BOOTDIR=/var/lib/tftpboot
# If the value is 'latest' we determine the latest release, else we use the set value.

if [ $RELEASE = latest ]; then
while [ -n "$TAG" ]; do
RESPONSE=$($CURL --silent "https://api.github.com/repos/frzb/coinboot-debirf/tags")
echo "Github API is not returing an response, repeat ..."
sleep 5
TAG=$(echo $RESPONSE | jq -r '.[0].name')
done
while ! TAG=$(echo $RESPONSE | jq -r '.[0].name'); do
echo "Calling the Github API has failed, repeat ..."
RESPONSE=$($CURL --silent "https://api.github.com/repos/frzb/coinboot-debirf/tags")
sleep 5
done
fi
echo "Using latest coinboot-debirf release: $TAG"
fi
URL=https://github.com/frzb/coinboot-debirf/releases/download/${TAG}

0 comments on commit f10b371

Please sign in to comment.
You can’t perform that action at this time.