| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- version: "{build}"
- clone_folder: c:\gopath\src\github.com\lifei6671\godoc
- environment:
- GOPATH: c:\gopath
- GOVERSION: 1.8
- matrix:
- - tbs_arch: "x86"
- tbs_tools: "mingw"
- tbs_static_runtime: 1
- GOARCH: 386
- - tbs_arch: "x64"
- tbs_tools: "mingw"
- tbs_static_runtime: 1
- GOARCH: amd64
- install:
- - ps: if($env:tbs_tools -eq 'mingw' -and $env:tbs_arch -eq 'x64')
- {
- Start-FileDownload "http://libgd.blob.core.windows.net/mingw/x86_64-4.9.1-release-posix-seh-rt_v3-rev1.7z" -FileName mingw_x86_64.7z;
- 7z x -oC:\ mingw_x86_64.7z | out-null;
- }
- - ps: if($env:tbs_tools -eq 'mingw' -and $env:tbs_arch -eq 'x86')
- {
- 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;
- }
- - echo %PATH%
- - echo %GOPATH%
- - go version
- - go env
- - go get -d ./...
- build_script:
- - 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%
- - set CGO_ENABLED=1
- - go build -v -o "godoc_windows_%GOARCH%.exe" -ldflags="-w -X github.com/lifei6671/godoc/conf.VERSION=%APPVEYOR_REPO_TAG_NAME% -X 'github.com/lifei6671/godoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'"
- - 7z a -t7z -r godoc_windows_%GOARCH%.7z conf/*.conf* static/* godoc_windows_%GOARCH%.exe views/* uploads/*
- test_script:
- - if [%tbs_arch%]==[x86] godoc_windows_386.exe version
- - if [%tbs_arch%]==[x64] godoc_windows_amd64.exe version
- notifications:
- - provider: Email
- to:
- - [email protected]
- on_build_success: false
- artifacts:
- - path: godoc_windows_%GOARCH%.7z
- name: Releases
- deploy:
- - provider: GitHub
- auth_token:
- secure: "Qkhxloft5lBKti7O+vVS+Vrxh7CBAUVhlfdZ9ptBXjFtjt6jHXnaBA2uv2OYbISB"
- draft: false
- prerelease: false
- artifact: godoc_windows_%GOARCH%.7z
- on:
- appveyor_repo_tag: true
|