I'm having a strange issue with Bitbucket Pipelines, where a previously working pipeline now fails without warning.
In this particular case I am, using bash, incrementing a variable of `0`.
(( VERSION_NUMBER_LIST[1]++ )); echo "${VERSION_NUMBER_LIST[0]}.${VERSION_NUMBER_LIST[1]} list version incremented";
What is especially confusing is that this worked fine before, and works in my local testing:
VERSION_NUMBER_OLD=0.0
IFS='.' read -ra VERSION_NUMBER_LIST <<< "$VERSION_NUMBER_OLD"; echo "${VERSION_NUMBER_LIST[0]}.${VERSION_NUMBER_LIST[1]} list version";
0.0 list version
(( VERSION_NUMBER_LIST[1]++ )); echo "${VERSION_NUMBER_LIST[0]}.${VERSION_NUMBER_LIST[1]} list version incremented";
0.1 list version incremented
Has anyone else encountered this strange error, or have any idea how to resolve.
My pipeline repeatedly fails due to this.
I'm using an Alpine 3.11 as my Docker image.
Fixed it with:
VERSION_NUMBER_LIST[1]=$((VERSION_NUMBER_LIST[1]+1)); echo "${VERSION_NUMBER_LIST[0]}.${VERSION_NUMBER_LIST[1]} list version incremented";
0.1 list version incremented
¯\_(ツ)_/¯
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.