Environment variable for release version run

This commit is contained in:
Core 2022-10-03 11:34:00 +01:00
parent 7041a2c33f
commit b8f661840a
No known key found for this signature in database
GPG key ID: 2AB8327FBA02D1C0
2 changed files with 7 additions and 3 deletions

View file

@ -29,7 +29,7 @@ jobs:
# name: Clear cache (only if CI fails uncomment this) # name: Clear cache (only if CI fails uncomment this)
# command: | # command: |
# rm -rf ~/.pnpm-store || true # rm -rf ~/.pnpm-store || true
# rm -rf node_modules || true # rm -rf node_modules || true
- run: - run:
name: Clear node_airtunes2 cache name: Clear node_airtunes2 cache
command: rm -rf ~/.pnpm-store/tmp/_tmp_1469292_a6751613e03842bf2a6fa9a4b21c3e28 || true command: rm -rf ~/.pnpm-store/tmp/_tmp_1469292_a6751613e03842bf2a6fa9a4b21c3e28 || true
@ -133,7 +133,7 @@ jobs:
- run: - run:
name: Run Version Script name: Run Version Script
command: | command: |
sudo chmod +x resources/version.sh && ./resources/version.sh || true sudo chmod +x resources/version.sh && GH_RELEASE_REQUEST=true ./resources/version.sh || true
echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV
- run: - run:
name: Publish Release name: Publish Release

View file

@ -11,7 +11,11 @@ fi
SHA_DATE=$(git show -s --format=%ci $STABLE_SHA) SHA_DATE=$(git show -s --format=%ci $STABLE_SHA)
COMMIT_SINCE_STABLE=$(git rev-list $STABLE_SHA..HEAD --count --since="$SHA_DATE") if [[ $GH_RELEASE_REQUEST != "" ]]; then
COMMIT_SINCE_STABLE=$(printf "%03d\n" $(git rev-list $STABLE_SHA..HEAD --count --since="$SHA_DATE"))
else
COMMIT_SINCE_STABLE=$(git rev-list $STABLE_SHA..HEAD --count --since="$SHA_DATE")
fi
CURRENT_VERSION=$(node -p -e "require('./package.json').version") CURRENT_VERSION=$(node -p -e "require('./package.json').version")
# Set the version number for commits on main branch # Set the version number for commits on main branch