|
|
@@ -15,7 +15,7 @@ $msbuild = Get-ItemProperty "hklm:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0
|
|
|
$msbuildExe = Join-Path $msbuild.MSBuildToolsPath "msbuild.exe"
|
|
|
|
|
|
# get tools
|
|
|
-.\nuget.exe install -excludeversion -pre gitversion.commandline -Version 3.5.5-pullrequest0921 -outputdirectory packages
|
|
|
+.\nuget.exe install -excludeversion gitversion.commandline -outputdirectory packages
|
|
|
|
|
|
#update version
|
|
|
.\packages\gitversion.commandline\tools\gitversion.exe /l console /output buildserver /updateassemblyinfo
|
|
|
@@ -40,7 +40,8 @@ $projects = gci $scriptPath -Directory `
|
|
|
| Where-Object { ($_.Name -notlike "*DeviceRunner") -and (Test-Path (Join-Path $_.FullName "project.json")) } `
|
|
|
|
|
|
foreach ($project in $projects) {
|
|
|
- dotnet build -c "$configuration" $project.FullName
|
|
|
+ dotnet build -c "$configuration" $project.FullName
|
|
|
+ if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
|
}
|
|
|
|
|
|
Write-Host "Building Packages" -Foreground Green
|
|
|
@@ -50,11 +51,14 @@ New-Item -ItemType Directory -Force -Path .\artifacts
|
|
|
|
|
|
foreach ($nuspec in $nuspecs) {
|
|
|
.\nuget pack $nuspec -symbols -Version $version -Properties "Configuration=$configuration" -MinClientVersion 2.12 -outputdirectory .\artifacts
|
|
|
+ if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
Write-Host "Running tests" -Foreground Green
|
|
|
$testDirectory = Join-Path $scriptPath "Tests"
|
|
|
dotnet test $testDirectory -c $configuration
|
|
|
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
|
|
|
|
Write-Host "Reverting AssemblyInfo's" -Foreground Green
|
|
|
gci $scriptPath -re -in AssemblyInfo.cs | %{ git checkout $_ }
|