diff options
Diffstat (limited to 'ci-upload.sh')
| -rwxr-xr-x | ci-upload.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ci-upload.sh b/ci-upload.sh index 9d2cff9..74c148a 100755 --- a/ci-upload.sh +++ b/ci-upload.sh @@ -1,5 +1,16 @@ #!/bin/bash +# end up when failed +set -Eeuo pipefail + +# clean up when exit +trap cleanup SIGINT SIGTERM ERR EXIT +cleanup() { + trap - SIGINT SIGTERM ERR EXIT + unset ARCH + unset PKGDEST +} + ARCH=$(uname -m) PKGDEST="${PWD}/packages/$ARCH" @@ -15,5 +26,3 @@ popd curl -d "token=$UPLOAD_TOKEN&action=UPLOADED" -fsSL "$REMOTE_PATH" -unset ARCH -unset PKGDEST |
