File tree 1 file changed +12
-6
lines changed
1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 81
81
echo " Using GPG key: $gpgkey "
82
82
echo " Fingerprint: $gpgfing "
83
83
84
+ function checktag {
85
+ local version=$1
86
+
87
+ if ! git tag -v $version 2>&1 | grep " ${gpgkey} " | grep key > /dev/null; then
88
+ echo " Could not find signed tag for \" ${version} \" or GPG key is not yours"
89
+ exit 1
90
+ fi
91
+ }
84
92
85
93
# ###############################################################################
86
94
# # Create and sign checksums file for a given version
@@ -90,11 +98,6 @@ function sign {
90
98
91
99
local version=$1
92
100
93
- if ! git tag -v $version 2>&1 | grep " ${gpgkey} " | grep key > /dev/null; then
94
- echo " Could not find signed tag for \" ${version} \" or GPG key is not yours"
95
- exit 1
96
- fi
97
-
98
101
ghtaggedversion=$( curl -sL https://raw.githubusercontent.com/nodejs/node/${version} /src/node_version.h \
99
102
| awk ' /define NODE_(MAJOR|MINOR|PATCH)_VERSION/{ v = v "." $3 } END{ v = "v" substr(v, 2); print v }' )
100
103
if [ " ${version} " != " ${ghtaggedversion} " ]; then
@@ -150,7 +153,8 @@ function sign {
150
153
151
154
152
155
if [ -n " ${signversion} " ]; then
153
- sign ${signversion}
156
+ checktag $signversion
157
+ sign $signversion
154
158
exit 0
155
159
fi
156
160
@@ -192,6 +196,8 @@ for version in $versions; do
192
196
continue
193
197
fi
194
198
199
+ checktag $version
200
+
195
201
echo -e " \n# Promoting ${version} ..."
196
202
197
203
ssh ${customsshkey} ${webuser} @${webhost} $promotecmd nodejs $version
You can’t perform that action at this time.
0 commit comments