forked from goblinfactory/konsole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
33 lines (25 loc) · 1.05 KB
/
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
$ErrorActionPreference = "Stop"
function Invoke {
param (
[scriptblock]$ScriptBlock
)
& @ScriptBlock
if ($lastexitcode -ne 0) {
Write-Host "------------------------" -foregroundcolor Red -backgroundcolor white
Write-Host "BUILD FAILED WITH ERROR!" -foregroundcolor Red -backgroundcolor white
Write-Host "------------------------" -foregroundcolor Red -backgroundcolor white
exit $lastexitcode
}
}
write-host "Konsole"
write-host "-------"
# dotnet build src/Konsole/Konsole.csproj --configuration Release
# dotnet build src/Konsole.Tests/Konsole.Tests.csproj --configuration Release
# dotnet test src/Konsole.Tests/Konsole.Tests.csproj
# when running on windows we can short circuit and build ALL the projects in the sln
invoke { dotnet build src/Konsole.sln --configuration Release }
invoke { dotnet test src/Konsole.Tests/Konsole.Tests.csproj }
invoke { dotnet test src/Konsole.Tests.Slow/Konsole.Tests.Slow.csproj }
Write-Host "---------------"
Write-Host "BUild completed"
Write-Host "---------------"