From 5d287eff2c42dc6613927626ce69c1d4ad6e0bc1 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 19 Dec 2017 09:31:38 +0800 Subject: [PATCH] update .appveyor.yml Signed-off-by: Bo-Yi Wu --- .appveyor.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 11f7784..489770b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,7 +1,9 @@ version: '{build}' image: 'Visual Studio 2017' +platform: x64 clone_folder: 'c:\go\src\github.com\appleboy\drone-telegram' +max_jobs: 1 environment: GOPATH: c:\go @@ -24,7 +26,12 @@ install: build_script: - ps: | - go build . + if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) { + go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o drone-telegram.exe + } else { + $version = $env:APPVEYOR_REPO_TAG_NAME.substring(1) + go build -ldflags "-X main.Version=$version -X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o drone-telegram.exe + } docker pull microsoft/nanoserver:10.0.14393.1884 docker build -f Dockerfile.windows -t appleboy/drone-telegram:windows .