[n/a] All new jobs, commands, executors, parameters have descriptions
[n/a] Examples have been added for any significant new features
[n/a] README has been updated, if necessary
Motivation, issues
In the dev-promote-from-commit-subject command's definition, the function CheckIncrement relies on a conditional expression to decide whether or no to fail the build if the commit subject doesn't include a SemVer increment:
if [ "$SHOULD_FAIL" == "true" ];then
exit 1
SHOULD_FAIL is defined as an environment variable of the related step:
However, as the shell environment variable SHOULD_FAIL will only ever resolves to either:
1 (if fail-if-semver-not-indicated is set to true)
or
0 (if fail-if-semver-not-indicated is set to false)
the expression [ "$SHOULD_FAIL" == "true" ] will always return false, and therefore the fail-if-semver-not-indicated parameter set to true will never be honored.
Description
Modify the aforementioned conditional expression so it references the relevant value of the environment variable, and allows fail-if-semver-not-indicated set to true to be honored.
Checklist
Motivation, issues
In the
dev-promote-from-commit-subject
command's definition, the functionCheckIncrement
relies on a conditional expression to decide whether or no to fail the build if the commit subject doesn't include aSemVer
increment:SHOULD_FAIL
is defined as an environment variable of the related step:SHOULD_FAIL: <<parameters.fail-if-semver-not-indicated>>
However, as the shell environment variable
SHOULD_FAIL
will only ever resolves to either:1
(iffail-if-semver-not-indicated
is set totrue
)or
0
(iffail-if-semver-not-indicated
is set tofalse
)the expression
[ "$SHOULD_FAIL" == "true" ]
will always returnfalse
, and therefore thefail-if-semver-not-indicated
parameter set totrue
will never be honored.Description
Modify the aforementioned conditional expression so it references the relevant value of the environment variable, and allows
fail-if-semver-not-indicated
set totrue
to be honored.Fixes #112