Update .travis.yml

pull/51/head
Minho 2017-05-30 18:52:32 +08:00 committed by GitHub
parent 3305ed5426
commit f039534b7b
1 changed files with 6 additions and 4 deletions

View File

@ -18,14 +18,16 @@ script:
before_deploy: before_deploy:
- sudo apt-get -qq update - sudo apt-get -qq update
- GOARCH=amd64 GOOS=linux go build -o godoc_linux_amd64 -ldflags="-w -X github.com/lifei6671/godoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/godoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'" - CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build -o godoc_linux_amd64 -ldflags="-w -X github.com/lifei6671/godoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/godoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'"
- GOARCH=amd64 GOOS=darwin go build -o godoc_darwin_amd64 -ldflags="-w -X github.com/lifei6671/godoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/godoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'" - CGO_ENABLED=1 GOARCH=amd64 GOOS=darwin go build -o godoc_darwin_amd64 -ldflags="-w -X github.com/lifei6671/godoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/godoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'"
- GOARCH=amd64 GOOS=windows go build -o godoc_windows_amd64.exe -ldflags="-w -X github.com/lifei6671/godoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/godoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'" - CGO_ENABLED=1 GOARCH=amd64 GOOS=windows go build -o godoc_windows_amd64.exe -ldflags="-w -X github.com/lifei6671/godoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/godoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'"
- CGO_ENABLED=1 GOARCH=386 GOOS=windows go build -o godoc_windows_i386.exe -ldflags="-w -X github.com/lifei6671/godoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/godoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'"
- rm -rf commands controllers models modules data routers tasks vendor docs search utils graphics .git Godeps uploads/* .gitignore .travis.yml Dockerfile gide.yaml LICENSE main.go README.md conf/enumerate.go conf/mail.go install.lock *.md - rm -rf commands controllers models modules data routers tasks vendor docs search utils graphics .git Godeps uploads/* .gitignore .travis.yml Dockerfile gide.yaml LICENSE main.go README.md conf/enumerate.go conf/mail.go install.lock *.md
- cp conf/app.conf.example conf/app.conf - cp conf/app.conf.example conf/app.conf
- zip -r godoc_linux_amd64.zip conf logs static uploads views lib godoc_linux_amd64 - zip -r godoc_linux_amd64.zip conf logs static uploads views lib godoc_linux_amd64
- zip -r godoc_darwin_amd64.zip conf logs static uploads views lib godoc_darwin_amd64 - zip -r godoc_darwin_amd64.zip conf logs static uploads views lib godoc_darwin_amd64
- zip -r godoc_windows_amd64.zip conf logs static uploads views lib godoc_windows_amd64.exe - zip -r godoc_windows_amd64.zip conf logs static uploads views lib godoc_windows_amd64.exe
- zip -r godoc_windows_i386.zip conf logs static uploads views lib godoc_windows_i386.exe
deploy: deploy:
provider: releases provider: releases