From b86612669bc9c853d945573ded198c86d149ca5b Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 16 Aug 2023 18:19:12 -0400 Subject: Condense note message in pre-push hook --- Biz/Ide/hooks/pre-push | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'Biz') 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" ## -- cgit v1.2.3