forked from calvn/chocolatey-consul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
35 lines (28 loc) · 1.1 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
version: 0.9.3.{build}
environment:
TOKEN:
secure: 3sxpbbTFvPJlNQ7fwBDGM6EkuisTVEnALEK9Krtx5zAOvXdaIo+jCql4ms7cyFyj
platform:
- x64
install:
- appveyor DownloadFile http://curl.haxx.se/ca/cacert.pem -FileName C:\cacert.pem
build_script:
- ps: >-
$env:CONSUL_VERSION = ($env:APPVEYOR_BUILD_VERSION | ? {$_ -match('^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-rc\d+)?')} | select @{L="Matches";E={$matches[0]}}).matches;
cmd /c download.bat;
choco pack consul.nuspec
test_script:
- ps: cinst consul -fdvy -source "$pwd;http://chocolatey.org/api/v2/"
- ps: cuninst -fdvy consul
- ps: cinst consul -fdvy -source "$pwd;http://chocolatey.org/api/v2/" -params '-bind=127.0.0.1'
- ps: cuninst -fdvy consul
deploy_script:
- ps: >-
Write-Host $env:APPVEYOR_REPO_TAG;
if($env:APPVEYOR_REPO_BRANCH -eq 'master' -And $env:APPVEYOR_REPO_TAG -eq 'true') {
$version = $env:APPVEYOR_BUILD_VERSION -replace('\.[^.\\/]+$');
choco apiKey -k $env:TOKEN -source https://push.chocolatey.org/;
choco push consul.$version.nupkg
}
artifacts:
- path: '**\*.nupkg'