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

pull/219/merge
Minho 2018-03-06 13:54:28 +08:00
parent f794963c0d
commit cf5f3323ce
2 changed files with 4 additions and 6 deletions

View File

@ -13,8 +13,8 @@ before_install:
- go get github.com/golang/freetype - go get github.com/golang/freetype
script: script:
- curl https://glide.sh/get | sh - go get -u github.com/golang/dep/cmd/dep
- glide update - 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:

View File

@ -27,9 +27,6 @@ install:
Start-FileDownload "http://libgd.blob.core.windows.net/mingw/i686-4.9.1-release-posix-dwarf-rt_v3-rev1.7z" -FileName mingw_x86.7z; Start-FileDownload "http://libgd.blob.core.windows.net/mingw/i686-4.9.1-release-posix-dwarf-rt_v3-rev1.7z" -FileName mingw_x86.7z;
7z x -oC:\ mingw_x86.7z | out-null; 7z x -oC:\ mingw_x86.7z | out-null;
} }
- ps: Start-FileDownload https://github.com/Masterminds/glide/releases/download/v0.12.3/glide-v0.12.3-windows-amd64.zip;
7z x -oC:\ glide-v0.12.3-windows-amd64.zip | out-null;
copy C:\windows-amd64\glide.exe c:\go\bin\ ;
- set PATH=%GOBIN%;%PATH% - set PATH=%GOBIN%;%PATH%
- echo %PATH% - echo %PATH%
- echo %GOPATH% - echo %GOPATH%
@ -40,7 +37,8 @@ build_script:
- if [%tbs_tools%]==[mingw] if [%tbs_arch%]==[x86] SET PATH=C:\mingw32\bin;%PATH% - if [%tbs_tools%]==[mingw] if [%tbs_arch%]==[x86] SET PATH=C:\mingw32\bin;%PATH%
- 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
- glide update - go get -u github.com/golang/dep/cmd/dep
- dep ensure
- 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/*