Last active
          June 20, 2019 19:38 
        
      - 
      
- 
        Save rms1000watt/2a2857c8ad0a3941f2e03e4cfc2c0c5c to your computer and use it in GitHub Desktop. 
    Build go versions of your golang app
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env bash | |
| set -e | |
| rm -rf bin ||: | |
| mkdir bin ||: | |
| PROJECT=$(basename $(git rev-parse --show-toplevel)) | |
| VERSION=$(cat version.txt) | |
| export CGO_ENABLED=0 | |
| for arch in amd64 386; do | |
| export GOARCH=$arch | |
| for os in darwin linux windows; do | |
| export GOOS=$os | |
| go build -o "bin/${PROJECT}-${VERSION}-${GOOS}-${GOARCH}" | |
| echo "bin/${PROJECT}-${VERSION}-${GOOS}-${GOARCH}" | |
| shasum -a 256 < "bin/${PROJECT}-${VERSION}-${GOOS}-${GOARCH}" | cut -d ' ' -f1 | |
| echo | |
| done | |
| done | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 0.3.1 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment