Merge pull request #5517

39c8099 contrib: make github-merge require signing (Wladimir J. van der Laan)
This commit is contained in:
Wladimir J. van der Laan 2014-12-23 11:27:46 +01:00
commit 66ef824a9f
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -156,12 +156,17 @@ read -p "Press 's' to sign off on the merge. " -n 1 -r >&2
echo
if [[ "d$REPLY" =~ ^d[Ss]$ ]]; 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
git commit -q --signoff --amend --no-edit
cleanup
exit 1
else
git commit -q --gpg-sign --amend --no-edit
fi
else
echo "Not signing off on merge, exiting."
cleanup
exit 1
fi
# Clean up temporary branches, and put the result in $BRANCH.