From 0f37e3665c0d3c4a85b2b7fd43f99d8cf3307361 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 18 Oct 2016 10:13:37 +1100 Subject: [PATCH] tools: check tag is on github before release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/9142 Reviewed-By: Myles Borins Reviewed-By: Evan Lucas Reviewed-By: Johan Bergström Reviewed-By: Colin Ihrig --- tools/release.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/release.sh b/tools/release.sh index c465e8081028fb..23b05b4fe8e1ef 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -78,6 +78,14 @@ function sign { if [ "${gpgtagkey}" != "${gpgkey}" ]; then echo "GPG key for \"${version}\" tag is not yours, cannot sign" + exit 1 + fi + + ghtaggedversion=$(curl -sL https://raw.githubusercontent.com/nodejs/node/${version}/src/node_version.h \ + | awk '/define NODE_(MAJOR|MINOR|PATCH)_VERSION/{ v = v "." $3 } END{ v = "v" substr(v, 2); print v }') + if [ "${version}" != "${ghtaggedversion}" ]; then + echo "Could not find tagged version on github.com/nodejs/node, did you push your tag?" + exit 1 fi shapath=$(ssh ${webuser}@${webhost} $signcmd nodejs $version)