Skip to content

Commit

Permalink
build: fix return code when SUFFIX is empty
Browse files Browse the repository at this point in the history
we run with bash -e, need to make sure all return codes are 0.
  • Loading branch information
michalskrivanek authored and mrkev-gh committed Nov 9, 2022
1 parent 7479235 commit 894ae2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .automation/build-srpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# git hash of current commit passed from GitHub or HEAD
GIT_HASH=$(git rev-parse --short ${GITHUB_SHA:-HEAD})
SUFFIX=$(grep -E "<version" pom.xml | head -n1 | awk -F '[<>]' '/version/{print $3}' | grep -q -- -SNAPSHOT && echo .git${GIT_HASH})
SUFFIX=$(grep -E "<version" pom.xml | head -n1 | awk -F '[<>]' '/version/{print $3}' | grep -q -- -SNAPSHOT && echo .git${GIT_HASH} || :)

# Directory, where build artifacts will be stored, should be passed as the 1st parameter
ARTIFACTS_DIR=${1:-exported-artifacts}
Expand Down

0 comments on commit 894ae2e

Please sign in to comment.