Skip to content

Commit

Permalink
Disable cmd line shell exit for gradle re-try logic (#1847)
Browse files Browse the repository at this point in the history
Signed-off-by: andrew-m-leonard <andrew_m_leonard@uk.ibm.com>
  • Loading branch information
andrew-m-leonard committed Jun 10, 2020
1 parent 8398efc commit c33c533
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ buildSharedLibs() {
local gradleJavaHome=$(getGradleHome)
echo "Running gradle with $gradleJavaHome"


# Disable cmd line failure shell exit
set +e
gradlecount=1
rc=1
while [[ $rc -ne 0 && $gradlecount -le 3 ]]
Expand All @@ -448,6 +449,8 @@ buildSharedLibs() {
echo "gradle attempt $gradlecount : rc=$rc "
gradlecount=$(( gradlecount + 1 ))
done
# Re-enable cmd line failure shell exit
set -e

# Test that the parser can execute as fail fast rather than waiting till after the build to find out
"$gradleJavaHome"/bin/java -version 2>&1 | "$gradleJavaHome"/bin/java -cp "target/libs/adopt-shared-lib.jar" ParseVersion -s -f semver 1
Expand Down

0 comments on commit c33c533

Please sign in to comment.