hack: correctly check for empty PULL_BASE_SHA
The existing comparison fails due to the 'nounset' option being on. That failure masks the nicely formatted error message the if message is trying to print. This correctly prints the intended error instead of bash's default unset behavior.
This commit is contained in:
parent
08df3631fa
commit
25979480d4
@ -20,7 +20,7 @@ set -o pipefail
|
||||
semvercompareOldVer=""
|
||||
semvercompareNewVer=""
|
||||
|
||||
if [ "${PULL_BASE_SHA}" == "" ]; then
|
||||
if [ -z "${PULL_BASE_SHA+a}" ]; then
|
||||
echo "PULL_BASE_SHA must be set"
|
||||
exit 1
|
||||
fi
|
||||
@ -31,7 +31,7 @@ fi
|
||||
|
||||
git fetch jetstack "${PULL_BASE_SHA}:refs/remotes/jetstack/pull-base"
|
||||
|
||||
SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
SCRIPT_ROOT="$(dirname "${BASH_SOURCE}")/.."
|
||||
|
||||
CHANGED_FOLDERS=`git diff --find-renames --name-only $(git merge-base jetstack/pull-base HEAD) "${SCRIPT_ROOT}/contrib/charts/" | awk -F/ '{print $1"/"$2"/"$3}' | uniq`
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user