refactor: add commit id in version for windows.

This commit is contained in:
Bo-Yi Wu 2017-12-21 14:39:19 +08:00
parent 6a15a1fd58
commit 660c4ddd04

View File

@ -27,7 +27,7 @@ install:
build_script:
- ps: |
if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) {
go build -ldflags "-X main.BuildNum=$env:APPVEYOR_BUILD_VERSION" -a -o drone-telegram.exe
go build -ldflags "-X main.Version=$env:APPVEYOR_REPO_COMMIT -X main.BuildNum=$env:APPVEYOR_BUILD_VERSION" -a -o drone-telegram.exe
} else {
$version = $env:APPVEYOR_REPO_TAG_NAME
go build -ldflags "-X main.Version=$version -X main.BuildNum=$env:APPVEYOR_BUILD_VERSION" -a -o drone-telegram.exe