More Travis config
This commit is contained in:
parent
e0e87419a6
commit
46bb0b9ec3
1 changed files with 6 additions and 2 deletions
|
@ -3,10 +3,14 @@ language: go
|
||||||
go:
|
go:
|
||||||
- 1.6
|
- 1.6
|
||||||
|
|
||||||
|
env:
|
||||||
|
- DATE=$(date -u '+%Y/%m/%d %H:%M:%S')
|
||||||
|
- BUILD_VERSION=$(if [ -n $TRAVIS_TAG ]; then echo -n $TRAVIS_COMMIT; else echo -n $TRAVIS_TAG; fi)
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- go get github.com/mitchellh/gox
|
- go get github.com/mitchellh/gox
|
||||||
- go get github.com/tcnksm/ghr
|
- go get github.com/tcnksm/ghr
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- gox -ldflags "-X 'main.buildVersion=$(if [ -n $TRAVIS_TAG ]; then echo -n $TRAVIS_COMMIT; else echo -n $TRAVIS_TAG; fi)' -X 'main.buildDate=$(date -u +%Y/%m/%d %H:%M:%S)'"
|
- gox -ldflags "-X 'main.buildVersion=$BUILD_VERSION' -X 'main.buildDate=$DATE'"
|
||||||
- ghr -u tblyler -r $TRAVIS_REPO_SLUG --token $GITHUB_TOKEN --replace dist/
|
- ghr --username tblyler --token $GITHUB_TOKEN --replace --prerelease --debug pre-release dist/
|
||||||
|
|
Loading…
Reference in a new issue