File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ prerelease_source="${1:-nightly}"
66git_tag=" ${2:- } " 
77FORCE_RELEASE=" ${FORCE_RELEASE:- } " 
88
9+ GNU_DATE=" date" 
10+ if  [[ " $OSTYPE " ==  " darwin" *  ]];  then 
11+     GNU_DATE=gdate
12+ fi 
13+ 
914if  [[ $FORCE_RELEASE  !=  " " ||  $git_tag  =~  ^v[0-9.]+$ ]];  then 
1015    echo  -n
1116elif  [[ $git_tag  =~  ^v[0-9.]+-pre. ]];  then 
1924    #  NOTE: git --date is supposed to support the %-m/%-d format too, but it does not seem to
2025    #  work on Windows. Without it we get leading zeros for month and day.
2126    last_commit_date=$( TZ=UTC git show --quiet --date=" format-local:%Y-%m-%d" " %cd" ) 
22-     last_commit_date_stripped=$( date  --date= " $last_commit_date " " +%Y.%-m.%-d" ) 
27+     last_commit_date_stripped=$( " $GNU_DATE "   " $last_commit_date " " +%Y.%-m.%-d" ) 
2328    echo  -n " ${prerelease_source} .${last_commit_date_stripped} " 
2429fi 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments