File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 8181echo  " Using GPG key: $gpgkey " 
8282echo  "   Fingerprint: $gpgfing " 
8383
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+ }
8492
8593# ###############################################################################
8694# # Create and sign checksums file for a given version
@@ -90,11 +98,6 @@ function sign {
9098
9199  local  version=$1 
92100
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- 
98101  ghtaggedversion=$( curl -sL https://raw.githubusercontent.com/nodejs/node/${version} /src/node_version.h \
99102      |  awk ' /define NODE_(MAJOR|MINOR|PATCH)_VERSION/{ v = v "." $3 } END{ v = "v" substr(v, 2); print v }' )  
100103  if  [ " ${version} "   !=  " ${ghtaggedversion} "   ];  then 
@@ -150,7 +153,8 @@ function sign {
150153
151154
152155if  [ -n  " ${signversion} "   ];  then 
153-     sign ${signversion} 
156+ 		checktag $signversion 
157+     sign $signversion 
154158    exit  0
155159fi 
156160
@@ -192,6 +196,8 @@ for version in $versions; do
192196      continue 
193197    fi 
194198
199+ 		checktag $version 
200+ 
195201    echo  -e " \n# Promoting ${version} ..." 
196202
197203    ssh ${customsshkey}  ${webuser} @${webhost}  $promotecmd  nodejs $version 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments