forked from mindoc-org/mindoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
59 lines (46 loc) · 1.61 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
version: 1.0.{build}
branches:
only:
- master
image: Visual Studio 2022
clone_folder: c:\gopath\src\github.com\mindoc-org\mindoc
init:
- cmd: >-
if [%tbs_arch%]==[x86] SET PATH=C:\msys64\mingw32\bin;%PATH%
if [%tbs_arch%]==[x64] SET PATH=C:\msys64\mingw64\bin;%PATH%
SET PATH=%GOPATH%\bin;%GOBIN%;%PATH%
FOR /f "delims=" %%i IN ('go version') DO (SET GO_VERSION=%%i)
git config --global --add safe.directory /cygdrive/c/gopath/src/github.com/mindoc-org/mindoc
environment:
GOPATH: c:\gopath
GOBIN: c:\gobin
GO111MODULE: on
CGO_ENABLED: 1
matrix:
- tbs_arch: x86
GOARCH: 386
job_name: job_x86
- tbs_arch: x64
GOARCH: amd64
job_name: job_x64
install:
- cmd: >-
echo %PATH%
echo %GO_VERSION%
go env
where gcc
where g++
build_script:
- cmd: >-
cd c:\gopath\src\github.com\mindoc-org\mindoc
go mod tidy -v
go build -v -o "mindoc_windows_%GOARCH%.exe" -ldflags="-w -X github.com/mindoc-org/mindoc/conf.VERSION=%APPVEYOR_REPO_TAG_NAME% -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=%date% %time%' -X 'github.com/mindoc-org/mindoc/conf.GO_VERSION=%GO_VERSION%'"
7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* conf/lang/* static/* mindoc_windows_%GOARCH%.exe views/* uploads/* lib/* LICENSE.md
test_script:
- cmd: >-
cd c:\gopath\src\github.com\mindoc-org\mindoc
pwsh -NoProfile -ExecutionPolicy Bypass -Command "& {Copy-Item -Force -Path 'conf\app.conf.example' -Destination 'conf\app.conf'}"
mindoc_windows_%GOARCH%.exe version
artifacts:
- path: mindoc_windows_*.7z
deploy: off