File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,19 @@ cd om
1111git remote set-url origin https://github.com/pivotal-cf/om
1212git fetch -t -P -p
1313
14- #  Kludge to get this thing buillt by go 1.22.5
15- wget https://go.dev/dl/go1.22.5.linux-amd64.tar.gz
16- tar xf go1.22.5.linux-amd64.tar.gz
17- rm go1.22.5.linux-amd64.tar.gz
14+ #  Extract Go version from go.mod file
15+ GO_VERSION=$( grep -E " ^go [0-9]+\.[0-9]+(\.[0-9]+)?"   go.mod |  awk ' {print $2}' ) 
16+ if  [ -z  " $GO_VERSION "   ];  then 
17+     echo  " Failed to extract Go version from go.mod" 
18+     exit  1
19+ fi 
20+ 
21+ echo  " Using Go version $GO_VERSION  from go.mod" 
22+ 
23+ #  Download and install the Go version specified in go.mod
24+ wget " https://go.dev/dl/go${GO_VERSION} .linux-amd64.tar.gz" 
25+ tar xf " go${GO_VERSION} .linux-amd64.tar.gz" 
26+ rm " go${GO_VERSION} .linux-amd64.tar.gz" 
1827rm -rf /usr/local/go
1928mv go /usr/local
2029
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments