From 46bb0b9ec3a138b129e6173ca852476781240627 Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Mon, 16 May 2016 21:09:00 -0400 Subject: [PATCH] More Travis config --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index be91970..aa3b3ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,14 @@ language: go go: - 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: - go get github.com/mitchellh/gox - go get github.com/tcnksm/ghr 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)'" - - ghr -u tblyler -r $TRAVIS_REPO_SLUG --token $GITHUB_TOKEN --replace dist/ + - gox -ldflags "-X 'main.buildVersion=$BUILD_VERSION' -X 'main.buildDate=$DATE'" + - ghr --username tblyler --token $GITHUB_TOKEN --replace --prerelease --debug pre-release dist/