I am trying to bump a version automatically when deploying a project into a QA environment.
I have the following code
args:
- '-c'
- |
set -x
npm install
npm i -g @nrwl/cli
npm version --git-tag-version false --commit-hooks false $(TZ=UTC0 git show --quiet --date='format-local:%Y' --format="%cd").$(TZ=UTC0 git show --quiet --date='format-local:%m%d' --format="%cd").${BUILD_ID}-${SHORT_SHA}
nx run-many --target=build --all --configuration=qa-1 --parallel
nx run-many --target=deploy-qa-1 --all --configuration=qa-1 --token "$$FIREBASE_TOKEN" --parallel
This works, but I would like to shorten the BUILD_ID to only 8 digits and not the full strings.
I tried using ${BUILD_ID::8} ${$(echo BUILD_ID::8)} but what I get is a empty string.
How to achieve it ?