切换包管理工具并升级依赖包

pull/219/merge
Minho 2018-03-06 14:26:18 +08:00
parent 39d50853be
commit b57951a1a2
2 changed files with 4 additions and 4 deletions

View File

@ -13,14 +13,14 @@ before_install:
- go get github.com/golang/freetype - go get github.com/golang/freetype
script: script:
- go get -u github.com/golang/dep/cmd/dep - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure - dep ensure
- GO_ENABLED=1 go build -v -x -tags "pam" && go install - GO_ENABLED=1 go build -v -x -tags "pam" && go install
before_deploy: before_deploy:
- sudo apt-get -qq update - sudo apt-get -qq update
- CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build -o mindoc_linux_amd64 -ldflags="-w -X github.com/lifei6671/mindoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/mindoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/mindoc/go version`'" - CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build -o mindoc_linux_amd64 -ldflags="-w -X github.com/lifei6671/mindoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/mindoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/mindoc/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 Gopkg.toml 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 mindoc_linux_amd64.zip conf logs static uploads views lib mindoc_linux_amd64 - zip -r mindoc_linux_amd64.zip conf logs static uploads views lib mindoc_linux_amd64

View File

@ -3,7 +3,7 @@ clone_folder: c:\gopath\src\github.com\lifei6671\mindoc
environment: environment:
GOPATH: c:\gopath GOPATH: c:\gopath
GOVERSION: "1.10" GOVERSION: 1.10
matrix: matrix:
- tbs_arch: "x86" - tbs_arch: "x86"
tbs_tools: "mingw" tbs_tools: "mingw"
@ -38,7 +38,7 @@ build_script:
- if [%tbs_tools%]==[mingw] if [%tbs_arch%]==[x64] SET PATH=C:\mingw64\bin;%PATH% - if [%tbs_tools%]==[mingw] if [%tbs_arch%]==[x64] SET PATH=C:\mingw64\bin;%PATH%
- set CGO_ENABLED=1 - set CGO_ENABLED=1
- go get -u github.com/golang/dep/cmd/dep - go get -u github.com/golang/dep/cmd/dep
- dep ensure - dep ensure -v
- for /f "delims=" %%i in ('go version') do (set GO_VERSION=%%i) - for /f "delims=" %%i in ('go version') do (set GO_VERSION=%%i)
- go build -v -o "mindoc_windows_%GOARCH%.exe" -ldflags="-w -X github.com/lifei6671/mindoc/conf.VERSION=%APPVEYOR_REPO_TAG_NAME% -X 'github.com/lifei6671/mindoc/conf.BUILD_TIME=%date% %time%' -X 'conf.GO_VERSION=%GO_VERSION%'" - go build -v -o "mindoc_windows_%GOARCH%.exe" -ldflags="-w -X github.com/lifei6671/mindoc/conf.VERSION=%APPVEYOR_REPO_TAG_NAME% -X 'github.com/lifei6671/mindoc/conf.BUILD_TIME=%date% %time%' -X 'conf.GO_VERSION=%GO_VERSION%'"
- 7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* static/* mindoc_windows_%GOARCH%.exe views/* uploads/* - 7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* static/* mindoc_windows_%GOARCH%.exe views/* uploads/*