forked from mindoc-org/mindoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
68 lines (60 loc) · 2.26 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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;
}
- 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%
- echo %PATH%
- echo %GOPATH%
- go version
- go env
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
- glide update
- for /f "delims=" %%i in ('go version') do (set GO_VERSION=%%i)
- 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% %time%' -X 'conf.GO_VERSION=%GO_VERSION%'"
- 7z a -t7z -r godoc_windows_%GOARCH%.7z conf/*.conf* static/* godoc_windows_%GOARCH%.exe views/* uploads/*
test_script:
- godoc_windows_%GOARCH%.exe version
notifications:
- provider: Email
to:
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