From 10a3526b8e9ade12d35b19ebd903b44d1bf06d57 Mon Sep 17 00:00:00 2001 From: Ugljesa Jovanovic Date: Fri, 23 Oct 2020 23:08:05 +0200 Subject: [PATCH] On windows gradle build completes successfully, but job is never completed, try to prevent that with exit 0 and exit 1 instead of set -e --- windowsBuild-delegated.sh | 11 +++++------ windowsBuild-pure.sh | 8 ++++---- windowsBuildAndPublish-delegated.sh | 16 ++++++++-------- windowsBuildAndPublish-pure.sh | 11 +++++------ 4 files changed, 22 insertions(+), 24 deletions(-) diff --git a/windowsBuild-delegated.sh b/windowsBuild-delegated.sh index d0e07d7..67662a6 100755 --- a/windowsBuild-delegated.sh +++ b/windowsBuild-delegated.sh @@ -1,8 +1,7 @@ -set -e #!/bin/sh #this will hopefully download all konan dependancies that we use in the build scripts -./gradlew --no-daemon clean -./gradlew --no-daemon multiplatform-crypto-api:build +./gradlew --no-daemon clean || exit 1 +./gradlew --no-daemon multiplatform-crypto-api:build || exit 1 cd sodiumWrapper echo "Starting mingw libsodium build" ./configureMingw64.sh @@ -13,8 +12,8 @@ make -j4 -C libsodium install echo "completed libsodium build" #now we can do the delegated build cd .. -./gradlew --no-daemon multiplatform-crypto-delegated:build +./gradlew --no-daemon multiplatform-crypto-delegated:build || exit 1 #and then libsodium bindings -./gradlew --no-daemon multiplatform-crypto-libsodium-bindings:build -set +e +./gradlew --no-daemon multiplatform-crypto-libsodium-bindings:build || exit 1 +exit 0 diff --git a/windowsBuild-pure.sh b/windowsBuild-pure.sh index b4677a7..9286a7d 100755 --- a/windowsBuild-pure.sh +++ b/windowsBuild-pure.sh @@ -1,6 +1,6 @@ -set -e #!/bin/sh -./gradlew --no-daemon multiplatform-crypto-api:build -./gradlew --no-daemon multiplatform-crypto:build -set +e +./gradlew --no-daemon multiplatform-crypto-api:build || exit 1 +./gradlew --no-daemon multiplatform-crypto:build || exit 1 +exit 0 + diff --git a/windowsBuildAndPublish-delegated.sh b/windowsBuildAndPublish-delegated.sh index 355d9eb..2215ea9 100755 --- a/windowsBuildAndPublish-delegated.sh +++ b/windowsBuildAndPublish-delegated.sh @@ -1,8 +1,7 @@ -set -e #!/bin/sh #this will hopefully download all konan dependancies that we use in the build scripts -./gradlew clean -./gradlew --no-daemon multiplatform-crypto-api:build +./gradlew clean || exit 1 +./gradlew --no-daemon multiplatform-crypto-api:build || exit 1 cd sodiumWrapper echo "Starting mingw libsodium build" ./configureMingw64.sh @@ -13,9 +12,10 @@ make -j4 -C libsodium install echo "completed libsodium build" #now we can do the delegated build cd .. -./gradlew --no-daemon multiplatform-crypto-delegated:build -./gradlew --no-daemon multiplatform-crypto-delegated:publishMingwX64PublicationToSnapshotRepository +./gradlew --no-daemon multiplatform-crypto-delegated:build || exit 1 +./gradlew --no-daemon multiplatform-crypto-delegated:publishMingwX64PublicationToSnapshotRepository || exit 1 + +./gradlew --no-daemon multiplatform-crypto-libsodium-bindings:build || exit 1 +./gradlew --no-daemon multiplatform-crypto-libsodium-bindings:publishMingwX64PublicationToSnapshotRepository || exit 1 +exit 0 -./gradlew --no-daemon multiplatform-crypto-libsodium-bindings:build -./gradlew --no-daemon multiplatform-crypto-libsodium-bindings:publishMingwX64PublicationToSnapshotRepository -set +e diff --git a/windowsBuildAndPublish-pure.sh b/windowsBuildAndPublish-pure.sh index ed2b628..9f5bf76 100755 --- a/windowsBuildAndPublish-pure.sh +++ b/windowsBuildAndPublish-pure.sh @@ -1,8 +1,7 @@ -set -e #!/bin/sh #this will hopefully download all konan dependancies that we use in the build scripts -./gradlew clean -./gradlew --no-daemon multiplatform-crypto-api:build -./gradlew --no-daemon multiplatform-crypto:build -./gradlew --no-daemon multiplatform-crypto:publishMingwX64PublicationToSnapshotRepository -set +e +./gradlew clean || exit 1 +./gradlew --no-daemon multiplatform-crypto-api:build || exit 1 +./gradlew --no-daemon multiplatform-crypto:build || exit 1 +./gradlew --no-daemon multiplatform-crypto:publishMingwX64PublicationToSnapshotRepository || exit 1 +exit 0