2017-05-30 19:31:28 +08:00
|
|
|
version: "{build}"
|
|
|
|
clone_folder: c:\gopath\src\github.com\lifei6671\godoc
|
|
|
|
|
|
|
|
environment:
|
|
|
|
GOPATH: c:\gopath
|
|
|
|
GOVERSION: 1.8
|
2017-05-30 20:20:10 +08:00
|
|
|
matrix:
|
|
|
|
- tbs_arch: "x86"
|
|
|
|
tbs_tools: "mingw"
|
|
|
|
tbs_static_runtime: 1
|
2017-05-31 15:34:20 +08:00
|
|
|
GOARCH: 386
|
2017-05-30 19:31:28 +08:00
|
|
|
|
2017-05-30 20:20:10 +08:00
|
|
|
- tbs_arch: "x64"
|
|
|
|
tbs_tools: "mingw"
|
|
|
|
tbs_static_runtime: 1
|
2017-05-30 20:46:00 +08:00
|
|
|
GOARCH: amd64
|
2017-05-30 19:42:31 +08:00
|
|
|
|
2017-05-30 19:31:28 +08:00
|
|
|
install:
|
2017-05-30 20:20:10 +08:00
|
|
|
|
|
|
|
- ps: if($env:tbs_tools -eq 'mingw' -and $env:tbs_arch -eq 'x64')
|
|
|
|
{
|
2017-05-30 21:00:04 +08:00
|
|
|
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;
|
2017-05-30 20:20:10 +08:00
|
|
|
}
|
2017-05-30 20:50:32 +08:00
|
|
|
- ps: if($env:tbs_tools -eq 'mingw' -and $env:tbs_arch -eq 'x86')
|
2017-05-30 20:20:10 +08:00
|
|
|
{
|
2017-05-30 21:00:04 +08:00
|
|
|
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;
|
2017-05-30 20:20:10 +08:00
|
|
|
}
|
2017-06-02 17:51:31 +08:00
|
|
|
- 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 %GOPATH%\bin\;
|
2017-06-02 17:18:57 +08:00
|
|
|
- set PATH=%GOBIN%;%PATH%
|
2017-05-30 19:31:28 +08:00
|
|
|
- echo %PATH%
|
|
|
|
- echo %GOPATH%
|
|
|
|
- go version
|
|
|
|
- go env
|
2017-06-02 17:43:43 +08:00
|
|
|
- go install github.com/Masterminds/glide
|
2017-05-30 19:31:28 +08:00
|
|
|
|
2017-05-30 20:46:00 +08:00
|
|
|
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%
|
2017-05-31 10:22:22 +08:00
|
|
|
- set CGO_ENABLED=1
|
2017-06-02 17:11:17 +08:00
|
|
|
- glide update
|
2017-05-31 16:06:41 +08:00
|
|
|
- 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`'"
|
2017-06-02 16:08:14 +08:00
|
|
|
- 7z a -t7z -r godoc_windows_%GOARCH%.7z conf/*.conf* static/* godoc_windows_%GOARCH%.exe views/* uploads/*
|
2017-05-30 19:31:28 +08:00
|
|
|
test_script:
|
2017-06-02 16:46:03 +08:00
|
|
|
- godoc_windows_%GOARCH%.exe version
|
2017-05-30 19:31:28 +08:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
- provider: Email
|
|
|
|
to:
|
|
|
|
- lifei6671@163.com
|
2017-05-30 21:34:38 +08:00
|
|
|
on_build_success: false
|
|
|
|
|
2017-05-31 11:27:18 +08:00
|
|
|
artifacts:
|
|
|
|
- path: godoc_windows_%GOARCH%.7z
|
|
|
|
name: Releases
|
|
|
|
|
2017-05-30 21:34:38 +08:00
|
|
|
deploy:
|
|
|
|
- provider: GitHub
|
|
|
|
auth_token:
|
2017-05-31 10:15:04 +08:00
|
|
|
secure: "Qkhxloft5lBKti7O+vVS+Vrxh7CBAUVhlfdZ9ptBXjFtjt6jHXnaBA2uv2OYbISB"
|
2017-05-30 21:34:38 +08:00
|
|
|
draft: false
|
2017-05-31 10:15:04 +08:00
|
|
|
prerelease: false
|
2017-05-30 21:39:23 +08:00
|
|
|
artifact: godoc_windows_%GOARCH%.7z
|
2017-05-30 21:34:38 +08:00
|
|
|
on:
|
|
|
|
appveyor_repo_tag: true
|