From c114273b2f86f1402d2ef9763d9c5b9cfa528a86 Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Wed, 3 Aug 2022 16:42:27 +0100 Subject: [PATCH] AGAIN! --- resources/version.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/resources/version.sh b/resources/version.sh index 1821f800..372434e0 100755 --- a/resources/version.sh +++ b/resources/version.sh @@ -6,12 +6,12 @@ COMMITSINCESTABLE=$(git rev-list $STABLE_SHA..HEAD --count --since="$SHA_DATE") CURRENT_VERSION=$(node -p -e "require('./package.json').version") # Make the version number -if [[ ($CIRCLE_BRANCH != "stable" && $GITHUB_REF_NAME != "stable") && $COMMITSINCESTABLE -gt 0 ]]; then - echo "This is not a stable branch, but there are commits since the last stable release. Setting beta version." - NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}" -else +if [[ $CIRCLE_BRANCH == "stable" || $GITHUB_REF_NAME == "stable" ]]; then echo "This is a stable branch. Setting stable version." NEW_VERSION=${CURRENT_VERSION/0/$COMMITSINCESTABLE} +else + echo "This is not a stable branch, but there are commits since the last stable release. Setting beta version." + NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}" fi echo "Version: $NEW_VERSION" @@ -29,5 +29,4 @@ elif [[ -z "${BASH_ENV}" ]]; then echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV fi - -node -p -e "require('./package.json').version" \ No newline at end of file +node -p -e "require('./package.json').version"