Skip to content

Commit

Permalink
move definition of VERSION to earlier in build (and out of -env).
Browse files Browse the repository at this point in the history
  • Loading branch information
bhamail committed Feb 1, 2019
1 parent ea8941e commit d1455c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go:
- 1.11.x
before_install:
- ./bumpver.sh
- export VERSION=$NEW_VERSION
install:
- go mod download
script:
Expand All @@ -13,7 +14,7 @@ script:
- 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
env:
- GO111MODULE=on VERSION=0.0.2
- GO111MODULE=on

before_deploy:
- export TRAVIS_TAG=$VERSION
Expand Down

0 comments on commit d1455c3

Please sign in to comment.