summaryrefslogtreecommitdiff
path: root/tools/release.sh
diff options
context:
space:
mode:
authorEvan Lucas <evanlucas@me.com>2016-09-28 05:59:08 -0500
committerMyles Borins <mborins@us.ibm.com>2016-11-11 14:10:11 -0500
commite2bb2a2550a82c9c83909b2de51ec8119602ec14 (patch)
tree4a3372d7a6fe7c5a15abd526c2ace69aac04fb4e /tools/release.sh
parent4141c77a25fdc1f1564167f82e1e638582eb4401 (diff)
downloadnode-new-e2bb2a2550a82c9c83909b2de51ec8119602ec14.tar.gz
tools: fix release script on macOS 10.12
Previously, we were relying on the output of gpg from git tag -v to verify that the key selected by the releaser is the key that was used to sign the tag. This output can change depending on the version of git being used. Now, we just check that the output of git tag -v contains the key selected. Fixes: https://github.com/nodejs/node/issues/8822 PR-URL: https://github.com/nodejs/node/pull/8824 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'tools/release.sh')
-rwxr-xr-xtools/release.sh11
1 files changed, 2 insertions, 9 deletions
diff --git a/tools/release.sh b/tools/release.sh
index 9a3b881bd5..1151b6dd68 100755
--- a/tools/release.sh
+++ b/tools/release.sh
@@ -69,15 +69,8 @@ function sign {
local version=$1
- gpgtagkey=$(git tag -v $version 2>&1 | grep 'key ID' | awk '{print $NF}')
-
- if [ "X${gpgtagkey}" == "X" ]; then
- echo "Could not find signed tag for \"${version}\""
- exit 1
- fi
-
- if [ "${gpgtagkey}" != "${gpgkey}" ]; then
- echo "GPG key for \"${version}\" tag is not yours, cannot sign"
+ if ! git tag -v $version 2>&1 | grep "${gpgkey}" | grep key > /dev/null; then
+ echo "Could not find signed tag for \"${version}\" or GPG key is not yours"
exit 1
fi