-
Notifications
You must be signed in to change notification settings - Fork 82
/
appveyor.yml
62 lines (44 loc) · 1.78 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
version: 1.0.{build}
branches:
only:
- master
clone_folder: c:\gopath\src\github.com\opencontrol\compliance-masonry
environment:
GOPATH: c:\gopath
GO111MODULE: on
install:
- choco install sed
- cmd: >-
echo %GOPATH%
go version
go env
set PATH=%PATH%;%GOPATH%\bin
- ps: >-
$env:GITVERSION = git describe --abbrev=0 --tags
$env:VERSION = $env:GITVERSION -replace 'v', ''
$env:SHORTCOMMIT = git rev-parse --short HEAD
$env:BUILD_INFO = date -u +"%Y-%m-%dT%T%z"
build_script:
- cmd: go build -mod=vendor -ldflags="-s -w -X github.com/opencontrol/compliance-masonry/version.Version=%VERSION% -X github.com/opencontrol/compliance-masonry/version.Commit=%SHORTCOMMIT% -X github.com/opencontrol/compliance-masonry/version.Date=%BUILD_INFO%" cmd/compliance-masonry/compliance-masonry.go
- cmd: go build -mod=vendor -ldflags="-s -w -X github.com/opencontrol/compliance-masonry/version.Version=%VERSION% -X github.com/opencontrol/compliance-masonry/version.Commit=%SHORTCOMMIT% -X github.com/opencontrol/compliance-masonry/version.Date=%BUILD_INFO%" cmd/masonry/masonry.go
- cmd: copy build\msi\*.* %cd%
- cmd: >-
sed.exe -i "s/BUILD_TAG_VERSION/%VERSION%/g" compliance-masonry.wxs
"%WIX%\bin\candle.exe" compliance-masonry.wxs
"%WIX%\bin\light.exe" compliance-masonry.wixobj -ext WixUIExtension -out compliance-masonry-%VERSION%.msi
artifacts:
- path: compliance-masonry-%VERSION%.msi
test_script:
- cmd: go test -mod=vendor ./... || exit /b 1
deploy:
provider: GitHub
auth_token:
secure: 1/66R0+4JaBgl++BK01wVm1Q+/WUdMRN2Cv4bK9IZZAt0Yj3XLxCPa+khmBBXaX0
artifact: compliance-masonry-%VERSION%.msi
draft: false
prerelease: false
force_update: true
on:
branch: master
APPVEYOR_REPO_TAG: true