From a4a7a976c43563e9477d3319aed7cfdffcdc8012 Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Thu, 4 Aug 2022 18:55:17 +0100 Subject: [PATCH] ffs again --- resources/version.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/version.sh b/resources/version.sh index 0fe78de2..43bb4d26 100755 --- a/resources/version.sh +++ b/resources/version.sh @@ -3,8 +3,10 @@ # Setup the variables needed if [[ $GITHUB_REF_NAME == "main" ]]; then STABLE_SHA=$(curl -H "Authorization: token ${GH_REQUEST_TOKEN}" https://api.github.com/repos/ciderapp/Cider/branches/stable | grep '"sha"' | head -1 | cut -d '"' -f 4) +elif [[ $CIRCLE_BRANCH == "main" ]]; then + STABLE_SHA=$(curl -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/ciderapp/Cider/branches/stable | grep '"sha"' | head -1 | cut -d '"' -f 4) else - STABLE_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/main | grep '"sha"' | head -1 | cut -d '"' -f 4) + STABLE_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep '"sha"' | head -1 | cut -d '"' -f 4) fi SHA_DATE=$(git show -s --format=%ci $STABLE_SHA)