-
Notifications
You must be signed in to change notification settings - Fork 2
/
.appveyor.yml
95 lines (81 loc) · 2.8 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
init:
- ps: if ($env:APPVEYOR_REPO_TAG -eq "true") { $env:TAG_VERSION = "$env:APPVEYOR_REPO_TAG_NAME.$env:APPVEYOR_BUILD_NUMBER" } else { $env:TAG_VERSION = "v0.0.0.$env:APPVEYOR_BUILD_NUMBER-alpha" }
- ps: $env:TAG_VERSION = $env:TAG_VERSION -replace 'v',''
- ps: Write-Host "Setting version to '$env:TAG_VERSION'"
- ps: Update-AppveyorBuild -Version "$env:TAG_VERSION"
image:
- Visual Studio 2017
- Ubuntu
configuration: Release
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true
skip_commits:
files:
- .gitignore
- LICENSE
- README.md
cache:
- packages -> **\packages.config
- '%LocalAppData%\NuGet\Cache'
assembly_info:
patch: true
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
before_build:
- ps: |
if ($isLinux) {
$env:COMPILED_BY = "Mono"
$env:EDITION = "mono"
} else {
$env:COMPILED_BY = "VS2017"
$env:EDITION = "dotnet"
}
- ps: (Get-Content Source\WHIP_LRU\Program.cs) -replace 'COMPILED_BY = "?mono?"', "COMPILED_BY = `"$env:COMPILED_BY`"" | Set-Content Source\WHIP_LRU\Program.cs
- ps: (Get-Content Source\RollbarCrashReporter\CrashReporter.cs) -replace 'COMPILED_BY = "?mono?"', "COMPILED_BY = `"$env:COMPILED_BY`"" | Set-Content Source\RollbarCrashReporter\CrashReporter.cs
- nuget restore WHIP_LRU.sln
build:
project: WHIP_LRU.sln
parallel: true
verbosity: minimal
publish_nuget: false
publish_nuget_symbols: false
for:
-
matrix:
only:
- image: Ubuntu
build_script:
- msbuild WHIP_LRU.sln
platform:
- x64
after_build:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true") {
(Get-Content bin\WHIP_LRU.exe.config) -replace 'param name="Environment" value="development"', 'param name="Environment" value="production"' | Set-Content bin\WHIP_LRU.exe.config
(Get-Content bin\RollbarCrashReporter.exe.config) -replace 'param name="Environment" value="development"', 'param name="Environment" value="production"' | Set-Content bin\RollbarCrashReporter.exe.config
}
else {
(Get-Content bin\WHIP_LRU.exe.config) -replace 'param name="Environment" value="development"', 'param name="Environment" value="test"' | Set-Content bin\WHIP_LRU.exe.config
(Get-Content bin\RollbarCrashReporter.exe.config) -replace 'param name="Environment" value="development"', 'param name="Environment" value="test"' | Set-Content bin\RollbarCrashReporter.exe.config
}
- ps: Rename-Item -Path bin -NewName WHIP-LRU
test: off
# assemblies:
# only:
# - UnitTests.dll
artifacts:
- path: WHIP-LRU
name: WHIP-LRU-$(EDITION)
type: zip
deploy:
provider: GitHub
auth_token:
secure: "tZGZ+LdhQz6wpgiCc15gbkDyu7l2Y3VzKPAzu9vhCiMdfuppmZwGYo/3luQSWBtq"
artifact: WHIP-LRU-$(EDITION)
draft: true
prerelease: false
on:
appveyor_repo_tag: true