瀏覽代碼

修改脚本

Minho 8 年之前
父節點
當前提交
0fdfd3e69b
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      appveyor.yml

+ 3 - 1
appveyor.yml

@@ -41,7 +41,9 @@ build_script:
   - if [%tbs_tools%]==[mingw] if [%tbs_arch%]==[x64] SET PATH=C:\mingw64\bin;%PATH%
   - set CGO_ENABLED=1
   - glide update
-  - 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`'"
+  - set Build_Time=%date% %time%
+  - for /f "delims=" %i in ('go version') do (set GO_VERSION=%i)
+  - 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=%Build_Time%' -X 'conf.GO_VERSION=%GO_VERSION%'"
   - 7z a -t7z -r godoc_windows_%GOARCH%.7z conf/*.conf* static/* godoc_windows_%GOARCH%.exe views/* uploads/*
 test_script:
   - godoc_windows_%GOARCH%.exe version