mirror of https://github.com/mindoc-org/mindoc.git
pull/51/head
parent
35f0ba1038
commit
41e19269e2
|
@ -10,10 +10,12 @@ environment:
|
||||||
- tbs_arch: "x86"
|
- tbs_arch: "x86"
|
||||||
tbs_tools: "mingw"
|
tbs_tools: "mingw"
|
||||||
tbs_static_runtime: 1
|
tbs_static_runtime: 1
|
||||||
|
GOARCH: 386
|
||||||
|
|
||||||
- tbs_arch: "x64"
|
- tbs_arch: "x64"
|
||||||
tbs_tools: "mingw"
|
tbs_tools: "mingw"
|
||||||
tbs_static_runtime: 1
|
tbs_static_runtime: 1
|
||||||
|
GOARCH: amd64
|
||||||
|
|
||||||
build: false
|
build: false
|
||||||
deploy: true
|
deploy: true
|
||||||
|
@ -39,8 +41,13 @@ install:
|
||||||
- go env
|
- go env
|
||||||
- go get -d ./...
|
- go get -d ./...
|
||||||
|
|
||||||
|
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%
|
||||||
|
- 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`' -X 'conf.GO_VERSION=`github.com/lifei6671/godoc/go version`'"
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- go build -x -v -tags "pam" -ldflags "-w"
|
- godoc_windows_%GOARCH%.exe version
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
- provider: Email
|
- provider: Email
|
||||||
|
|
|
@ -28,6 +28,13 @@ func Install() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Version() {
|
||||||
|
if len(os.Args) >= 2 && os.Args[1] == "version" {
|
||||||
|
fmt.Println(conf.VERSION)
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//初始化数据
|
//初始化数据
|
||||||
func initialization() {
|
func initialization() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue