|
@@ -6,10 +6,11 @@ image: Visual Studio 2022
|
|
|
clone_folder: c:\gopath\src\github.com\mindoc-org\mindoc
|
|
|
init:
|
|
|
- cmd: >-
|
|
|
- if [%tbs_arch%]==[x86] SET PATH=C:\MinGW\bin;%PATH%
|
|
|
- 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%
|
|
|
+ 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
|
|
@@ -18,8 +19,10 @@ environment:
|
|
|
matrix:
|
|
|
- tbs_arch: x86
|
|
|
GOARCH: 386
|
|
|
+ job_name: job_x86
|
|
|
- tbs_arch: x64
|
|
|
GOARCH: amd64
|
|
|
+ job_name: job_x64
|
|
|
install:
|
|
|
- cmd: >-
|
|
|
echo %PATH%
|
|
@@ -30,13 +33,14 @@ install:
|
|
|
build_script:
|
|
|
- cmd: >-
|
|
|
cd c:\gopath\src\github.com\mindoc-org\mindoc
|
|
|
- go mod tidy
|
|
|
- go build -ldflags "-w"
|
|
|
+ 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 'conf.GO_VERSION=%GO_VERSION%'"
|
|
|
- 7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* static/* mindoc_windows_%GOARCH%.exe views/* uploads/*
|
|
|
+ 7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* conf/lang/* static/* mindoc_windows_%GOARCH%.exe views/* uploads/*
|
|
|
test_script:
|
|
|
- cmd: >-
|
|
|
cd c:\gopath\src\github.com\mindoc-org\mindoc
|
|
|
xcopy conf\app.conf.example conf\app.conf /F /Y
|
|
|
mindoc_windows_%GOARCH%.exe version
|
|
|
-deploy: off
|
|
|
+artifacts:
|
|
|
+- path: mindoc_windows_*.7z
|
|
|
+deploy: off
|