Skip to content

Commit e2bb2a2

Browse files
evanlucasMyles Borins
authored and
Myles Borins
committed
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: #8822 PR-URL: #8824 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent 4141c77 commit e2bb2a2

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

tools/release.sh

+2-9
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,8 @@ function sign {
6969

7070
local version=$1
7171

72-
gpgtagkey=$(git tag -v $version 2>&1 | grep 'key ID' | awk '{print $NF}')
73-
74-
if [ "X${gpgtagkey}" == "X" ]; then
75-
echo "Could not find signed tag for \"${version}\""
76-
exit 1
77-
fi
78-
79-
if [ "${gpgtagkey}" != "${gpgkey}" ]; then
80-
echo "GPG key for \"${version}\" tag is not yours, cannot sign"
72+
if ! git tag -v $version 2>&1 | grep "${gpgkey}" | grep key > /dev/null; then
73+
echo "Could not find signed tag for \"${version}\" or GPG key is not yours"
8174
exit 1
8275
fi
8376

0 commit comments

Comments
 (0)