CI-Appveyor配置错误修复

pull/790/head
gsw945 2022-05-09 17:11:09 +08:00
parent 127f7a5cd3
commit 68e3aefb56
2 changed files with 11 additions and 7 deletions

View File

@ -1,7 +1,7 @@
# MinDoc 简介
[![Build Status](https://travis-ci.com/mindoc-org/mindoc.svg?branch=master)](https://travis-ci.com/mindoc-org/mindoc)
[![Build status](https://ci.appveyor.com/api/projects/status/o3lcfmf5iy2cp9m6?svg=true)](https://ci.appveyor.com/project/gsw945/mindoc)
[![Build status](https://ci.appveyor.com/api/projects/status/7680ia6mu29m12wx?svg=true)](https://ci.appveyor.com/project/mindoc-org/mindoc)
MinDoc 是一款针对IT团队开发的简单好用的文档管理系统。

View File

@ -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