Skip to content

Commit a23a238

Browse files
committed
tools: check tag is on github before release
PR-URL: #9142 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 1fcf561 commit a23a238

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/release.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ function sign {
7878

7979
if [ "${gpgtagkey}" != "${gpgkey}" ]; then
8080
echo "GPG key for \"${version}\" tag is not yours, cannot sign"
81+
exit 1
82+
fi
83+
84+
ghtaggedversion=$(curl -sL https://github.com/raw/nodejs/node/${version}/src/node_version.h \
85+
| awk '/define NODE_(MAJOR|MINOR|PATCH)_VERSION/{ v = v "." $3 } END{ v = "v" substr(v, 2); print v }')
86+
if [ "${version}" != "${ghtaggedversion}" ]; then
87+
echo "Could not find tagged version on github.com/nodejs/node, did you push your tag?"
88+
exit 1
8189
fi
8290

8391
shapath=$(ssh ${webuser}@${webhost} $signcmd nodejs $version)

0 commit comments

Comments
 (0)