-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.ps1
18 lines (15 loc) · 815 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# restore and builds all projects as release.
# creates NuGet package at \artifacts
dotnet --version
$versionPrefix = "5.2.4" # Also update version for minor versions in appveyor.yml
$versionSuffix = ""
$versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER}
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
$versionPrefix = $versionFile
$versionSuffix = "PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER
}
msbuild /t:restore,pack /p:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /maxcpucount /p:PackageOutputPath=..\artifacts /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ContinuousIntegrationBuild=true /p:EmbedUntrackedSources=true /verbosity:minimal
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}
exit $LastExitCode