Skip to content

Commit 7409c33

Browse files
rvaggMylesBorins
authored andcommitted
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 b632bad commit 7409c33

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/release.sh

+8
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://raw.githubusercontent.com/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)