Browse Source

contrib: make github-merge require signing

- Exit when there is no signing key configured
- Exit when user does not want to sign off
0.13
Wladimir J. van der Laan 10 years ago
parent
commit
39c809942d
  1. 9
      contrib/devtools/github-merge.sh

9
contrib/devtools/github-merge.sh

@ -156,12 +156,17 @@ read -p "Press 's' to sign off on the merge. " -n 1 -r >&2
echo echo
if [[ "d$REPLY" =~ ^d[Ss]$ ]]; then if [[ "d$REPLY" =~ ^d[Ss]$ ]]; then
if [[ "$(git config --get user.signingkey)" == "" ]]; then if [[ "$(git config --get user.signingkey)" == "" ]]; then
echo "WARNING: No GPG signing key set, not signing. Set one using:" >&2 echo "ERROR: No GPG signing key set, not signing. Set one using:" >&2
echo "git config --global user.signingkey <key>" >&2 echo "git config --global user.signingkey <key>" >&2
git commit -q --signoff --amend --no-edit cleanup
exit 1
else else
git commit -q --gpg-sign --amend --no-edit git commit -q --gpg-sign --amend --no-edit
fi fi
else
echo "Not signing off on merge, exiting."
cleanup
exit 1
fi fi
# Clean up temporary branches, and put the result in $BRANCH. # Clean up temporary branches, and put the result in $BRANCH.

Loading…
Cancel
Save