forked from EasyNetQ/EasyNetQ.Management.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
40 lines (40 loc) · 1.79 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
version: Build {build}
skip_branch_with_pr: true
image: Previous Visual Studio 2019
install:
- ps: |
$dockerPathName = (Get-WmiObject win32_service | ?{$_.Name -eq 'docker'}).PathName
Write-Host $dockerPathName
$dockerConfigFile = $dockerPathName.split()[-1].trim('"')
Get-Content $dockerConfigFile
$integTestsConfigFile = '.\Source\EasyNetQ.Management.Client.IntegrationTests\settings.json'
$integTestsConfig = Get-Content $integTestsConfigFile
$integTestsConfig -replace ("""dockerHttpApiUri"": ""http://127.0.0.1:2375""", """dockerHttpApiUri"": ""npipe://./pipe/docker_engine_windows""") | Set-Content $integTestsConfigFile
before_build:
- ps: |
$mostRecentTag = git describe --abbrev=0 --tags --always
Write-Host "Detected most recent tag is '$mostRecentTag'"
if ($mostRecentTag.Substring(0, 1) -ne 'v') {
$mostRecentTag = 'v1.0.0'
if ($env:APPVEYOR_REPO_TAG -eq 'true') { exit 1 }
}
$mostRecentVersion = $mostRecentTag.Substring(1)
$currentCommitHash = git rev-parse --short HEAD
Set-AppveyorBuildVariable -Name SW_VER -Value $mostRecentVersion
Update-AppveyorBuild -Version "Build $env:APPVEYOR_BUILD_NUMBER - Commit $currentCommitHash - Tag v$env:SW_VER"
build_script:
- ps: |
$additionalArgs = if ($env:APPVEYOR_REPO_TAG -ne 'true') { "--buildNumber=$env:APPVEYOR_BUILD_NUMBER" }
.\Tools\build\build.ps1 '--target=Pack' "--softwareVersion=$env:SW_VER" $additionalArgs
if ($LastExitCode -ne 0) { exit $LastExitCode }
test: off
artifacts:
- path: Tools\build\artifacts\*.nupkg
- path: Tools\build\artifacts\*.snupkg
deploy:
provider: NuGet
api_key:
secure: 66jtnjtqHsmDz28LsEL0PX4tE4KGPP2HknE1EthEJ2dHNjeMMxrez8NeGcsW4BSV
skip_symbols: false
on:
appveyor_repo_tag: true