diff options
author | Ben Sima <ben@bsima.me> | 2024-04-03 15:29:37 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-04-03 16:18:12 -0400 |
commit | 177b2f42de0339c3ac91ee7b9a91d47bd39d3062 (patch) | |
tree | 6ba553d2cb57e034e0a975b0911ae940bcd00327 | |
parent | 432739b3e950f3ee33d4f083343b28f7755d0861 (diff) |
Don't exit CI script on failure
The whole point is to catch errors and write the result to the git notes, if the
process exits then we can't do that.
-rwxr-xr-x | Biz/Ci.sh | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -9,8 +9,10 @@ # It would be cool to use a zero-knowledge proof mechanism here to prove that # so-and-so ran the tests, but I'll have to research how to do that. # +# ensure we don't exit on bild failure, only on CI script error + set +e + set -u ## - set -uo pipefail [[ -n $(git status -s) ]] && { echo fail: dirty worktree; exit 1; } ## at=$(date -R) @@ -37,7 +39,6 @@ lint_result="good" else lint_result="fail" - exit 1 fi ## if bild "${BILD_ARGS:-""}" --test "${CODEROOT:?}"/**/* @@ -45,7 +46,6 @@ test_result="good" else test_result="fail" - exit 1 fi ## read -r -d '' note <<EOF @@ -57,3 +57,6 @@ EOF ## git notes --ref=ci append -m "$note" ## +# exit 1 if failure + [[ ! "$lint_result" == "fail" && ! "$test_result" == "fail" ]] +## |