2021-03-27 21:40:36 +08:00
version : 1.0 .{build}
branches :
only :
- master
image : Visual Studio 2015
clone_folder : c:\gopath\src\github.com\mindoc-org\mindoc
init :
- cmd : >-
if [%tbs_arch%]==[x86] SET PATH=C:\MinGW\bin;%PATH%
2017-05-30 19:31:28 +08:00
2021-03-27 21:40:36 +08:00
if [%tbs_arch%]==[x64] SET PATH=C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
SET PATH=%GOPATH%\bin;%GOBIN%;%PATH%
FOR /f "delims=" %%i IN ('go version') DO (SET GO_VERSION=%%i)
2017-05-30 19:31:28 +08:00
environment :
GOPATH : c:\gopath
2021-03-27 21:40:36 +08:00
GOBIN : c:\gobin
GO111MODULE : on
CGO_ENABLED : 1
2017-05-30 20:20:10 +08:00
matrix :
2021-03-27 21:40:36 +08:00
- tbs_arch : x86
GOARCH : 386
- tbs_arch : x64
GOARCH : amd64
install :
- cmd : >-
echo %PATH%
2017-05-30 19:31:28 +08:00
2021-03-27 21:40:36 +08:00
echo %GO_VERSION%
2017-05-30 19:42:31 +08:00
2021-03-27 21:40:36 +08:00
go env
where gcc
2017-05-30 19:31:28 +08:00
2021-03-27 21:40:36 +08:00
where g++
2017-05-30 20:46:00 +08:00
build_script :
2021-03-27 21:40:36 +08:00
- cmd : >-
cd c:\gopath\src\github.com\mindoc-org\mindoc
go mod tidy
2017-05-30 19:31:28 +08:00
2021-03-27 21:40:36 +08:00
go build -ldflags "-w"
2017-05-30 21:34:38 +08:00
2021-03-27 21:40:36 +08:00
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 'conf.GO_VERSION=%GO_VERSION%'"
7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* static/* mindoc_windows_%GOARCH%.exe views/* uploads/*
test_script :
- cmd : >-
cd c:\gopath\src\github.com\mindoc-org\mindoc
2017-05-31 11:27:18 +08:00
2021-03-27 21:40:36 +08:00
mindoc_windows_%GOARCH%.exe version
deploy : off