File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 77jobs :
88  pre-release :
99    name : " Beta Release" 
10+     environment : production 
1011    runs-on : " ubuntu-latest" 
1112    services :
1213      mongodb :
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33BRANCH=" $1 " 
4- BUILD_NUMBER =" $2 " 
4+ SHORT_HASH =" $2 " 
55MONGO_URL=" $3 " 
66MONGO_USERNAME=" $4 " 
77MONGO_PASSWORD=" $5 " 
8- VERSION=" $BRANCH +$BUILD_NUMBER  " 
8+ VERSION=" $BRANCH +$SHORT_HASH  " 
99
1010if  [[ -z  " $MONGO_USERNAME "   ||  -z  " $MONGO_PASSWORD "   ]];  then 
1111	echo  " No mongo credentials so doing nothing..." 
12- 	return  0 
12+ 	return  1 
1313fi 
1414
1515echo  " Mongo URL: $MONGO_URL " 
2020	FIELD=" stableCliVersion" 
2121fi 
2222
23- echo  " Release: $FIELD  $VERSION " 
23+ echo  " Release: $FIELD  as  $VERSION " 
2424
2525mongo " ${MONGO_URL} "   --username=" ${MONGO_USERNAME} "   --password=" ${MONGO_PASSWORD} "   -eval " db.application.updateOne({}, {\$ set: { \" $FIELD \" : \" $VERSION \" }});" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments