forked from EasyNetQ/EasyNetQ.Management.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
43 lines (43 loc) · 2.5 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
version: Build {build}
image: Visual Studio 2017
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:4243""", """dockerHttpApiUri"": ""npipe://./pipe/docker_engine_windows""") | Set-Content $integTestsConfigFile
$DOTNET_INSTALL_DIR = $(Join-Path (Get-Location) 'dotnetsdk')
powershell -NoProfile -ExecutionPolicy Unrestricted -Command "&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version 1.1.9 -InstallDir $DOTNET_INSTALL_DIR -NoPath"
powershell -NoProfile -ExecutionPolicy Unrestricted -Command "&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version 2.1.201 -InstallDir $DOTNET_INSTALL_DIR -NoPath"
powershell -NoProfile -ExecutionPolicy Unrestricted -Command "&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version 2.1.301 -InstallDir $DOTNET_INSTALL_DIR -NoPath"
$env:Path = "$DOTNET_INSTALL_DIR;$env:Path"
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
deploy:
provider: NuGet
api_key:
secure: ZAiG/Aj/gjDIzS+JxX2ZhAw1wUn9sNHdU+gwqqW2vpyrb5V9se4PU25YNWGads+g
skip_symbols: false
on:
appveyor_repo_tag: true