check-updates.sh: follow redirects

This commit is contained in:
Leonid Pliushch 2021-06-13 22:34:38 +03:00
parent a33bfe8acc
commit f6d370d611
No known key found for this signature in database
GPG Key ID: 45F2964132545795

View File

@ -39,7 +39,7 @@ if [ -f "${BASEDIR}/github-projects.txt" ]; then
fi
# Latest version is the current release tag on Github.
latest_version=$(curl --silent -H "Authorization: token ${GITHUB_API_TOKEN}" "https://api.github.com/repos/${project}/releases/latest" | jq -r .tag_name)
latest_version=$(curl --silent --location -H "Authorization: token ${GITHUB_API_TOKEN}" "https://api.github.com/repos/${project}/releases/latest" | jq -r .tag_name)
# Remove leading 'v' which is common in version tag.
latest_version=${latest_version#v}