From f689f7e10cf3bc97d03fdf03599b24445f836f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Tue, 23 Aug 2022 13:37:30 +0200 Subject: [PATCH] a fix for how this script detect versions in github Replaced it with the one from functions.sh --- utils/checkLabels.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/checkLabels.sh b/utils/checkLabels.sh index c682717..90b9433 100755 --- a/utils/checkLabels.sh +++ b/utils/checkLabels.sh @@ -63,7 +63,7 @@ versionFromGit() { # $1 git user name, $2 git repo name gitusername=${1?:"no git user name"} gitreponame=${2?:"no git repo name"} - appNewVersion=$(curl --silent --fail "https://github.com/$gitusername/$gitreponame/releases/latest" | sed -E 's/.*tag\/(.*)\">.*/\1/g' | sed 's/[^0-9\.]//g') + appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') if [ -z "$appNewVersion" ]; then printlog "could not retrieve version number for $gitusername/$gitreponame: $appNewVersion" exit 9