forked from aaubry/YamlDotNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
37 lines (28 loc) · 989 Bytes
/
build.ps1
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
. .\BuildUtils\build_utils.ps1
$build_unity = $true
$targets = "Release-Unsigned", "Release-Signed", "Release-Portable-Unsigned", "Release-Portable-Signed"
if($build_unity) {
$targets += "Release-UnitySubset-v35"
}
$targets |
% { $i = 0 } {
if($i++ -gt 0) {
Write-Host ""
Write-Host "--------------------------------------------------------------------------------------"
Write-Host ""
}
if(Test-Path "C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll") {
msbuild YamlDotNet.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=$_
} else {
msbuild YamlDotNet.sln /p:Configuration=$_
}
if($LASTEXITCODE -ne 0) {
throw "Build failed"
}
}
"Unsigned", "Signed" | % {
nuget pack YamlDotNet\YamlDotNet.$_.nuspec -OutputDirectory YamlDotNet\bin
if($LASTEXITCODE -ne 0) {
throw "Build failed"
}
}