Skip to content

Commit

Permalink
Fix CGO_ENABLED some times releasing (#56)
Browse files Browse the repository at this point in the history
See here
https://docs.travis-ci.com/user/environment-variables/#defining-multiple-variables-per-item

To have these not spin up multiple builds you must define them all on
the same line. When they are multiple builds it is a crapshoot as far as
which one gets released b/c its first one wins and that is not
consistent.
  • Loading branch information
zendern authored and bhamail committed Nov 20, 2019
1 parent dfed5aa commit 9158ed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ install:
- go mod download
script:
- go test ./... -v
- go env
- GOOS=linux GOARCH=amd64 go build -ldflags="-X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildVersion=$VERSION' -X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildTime=$time' -X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildCommit=$TRAVIS_COMMIT'" -o nancy-linux.amd64-$VERSION
- GOOS=darwin GOARCH=amd64 go build -ldflags="-X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildVersion=$VERSION' -X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildTime=$time' -X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildCommit=$TRAVIS_COMMIT'" -o nancy-darwin.amd64-$VERSION
- GOOS=windows GOARCH=amd64 go build -ldflags="-X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildVersion=$VERSION' -X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildTime=$time' -X 'github.com/sonatype-nexus-community/nancy/buildversion.BuildCommit=$TRAVIS_COMMIT'" -o nancy-windows.amd64-$VERSION.exe
- ./nancy-linux.amd64-$VERSION Gopkg.lock
- ./nancy-linux.amd64-$VERSION go.sum
- go list -m all | ./nancy-linux.amd64-$VERSION
env:
- GO111MODULE=on
- CGO_ENABLED=0
- GO111MODULE=on CGO_ENABLED=0

before_deploy:
- export TRAVIS_TAG=$VERSION
Expand Down

0 comments on commit 9158ed7

Please sign in to comment.