[release] Ignore commit hooks
So this can be run in a git clone that has commit hooks
(e.g., for adding Gerrit change id) without adding garbage
to the commit log.
--
MOS_MIGRATED_REVID=104761737
diff --git a/scripts/release/release_test.sh b/scripts/release/release_test.sh
index 2d28c8f..deb8126 100755
--- a/scripts/release/release_test.sh
+++ b/scripts/release/release_test.sh
@@ -236,10 +236,16 @@
expect_log "Baseline: 2464526"
# Abandon it
abandon v2
+ # Add a commit hook to test if it is ignored
+ cat <<'EOF' >.git/hooks/commit-msg
+echo HOOK-SHOULD-BE-IGNORED >>$1
+EOF
+ chmod +x .git/hooks/commit-msg
# Re-create release
create v2 2464526
expect_log "Release v2"
expect_log "Baseline: 2464526"
+ expect_not_log "HOOK-SHOULD-BE-IGNORED"
# Push
push
# Abandon it