diff options
author | Ben Sima <ben@bsima.me> | 2023-08-16 18:19:12 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2023-08-16 18:25:00 -0400 |
commit | b86612669bc9c853d945573ded198c86d149ca5b (patch) | |
tree | 3765b041529613472bcc117269b49a4bb6e8da3b /Biz/Ide/hooks/pre-push | |
parent | daeaece7ab87b88c00fa989ebc2a2973d8338dcd (diff) |
Condense note message in pre-push hook
Diffstat (limited to 'Biz/Ide/hooks/pre-push')
-rwxr-xr-x | Biz/Ide/hooks/pre-push | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Biz/Ide/hooks/pre-push b/Biz/Ide/hooks/pre-push index a1dccc3..9b94f93 100755 --- a/Biz/Ide/hooks/pre-push +++ b/Biz/Ide/hooks/pre-push @@ -4,7 +4,7 @@ # RFC-2822, more or less. # ## - set -euo pipefail + set -uo pipefail [[ -n $(git status -s) ]] && { echo fail: dirty worktree; exit 1; } ## at=$(date -R) @@ -18,9 +18,12 @@ lint_result="fail" fi ## - git notes --ref=ci append -m "Lint-is: $lint_result" - git notes --ref=ci append -m "Lint-by: $user <$mail>" - git notes --ref=ci append -m "Lint-at: $at" + read -r -d '' note <<'EOF' + Lint-is: $lint_result + Lint-by: $user <$mail> + Lint-at: $at +EOF + git notes --ref=ci append -m "$note" ## if bild --test "${BIZ_ROOT:?}"/**/* then @@ -29,7 +32,10 @@ test_result="fail" fi ## - git notes --ref=ci append -m "Test-is: $test_result" - git notes --ref=ci append -m "Test-by: $user <$mail>" - git notes --ref=ci append -m "Test-at: $at" + read -r -d '' note <<'EOF' + Test-is: $test_result + Test-by: $user <$mail> + Test-at: $at +EOF + git notes --ref=ci append -m "$note" ## |