I have a CI_COMMIT_TAG variable with the following sample value: v12.23.34.
I would like to extract the major part number of the tag on CI_RELEASE_MAJOR, meaning 12.
Following this documentation, I did the following:
export CI_RELEASE_MAJOR=${${CI_COMMIT_TAG#v}%%.*}
This is working on zsh, but not on bash, giving the following error:
CI_RELEASE_MAJOR=${${CI_COMMIT_TAG#v}%%.*}: bad substitution
Why is it not working on bash and what is the proper way to achieve what I want?
Thanks!