forked from fixie/fixie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
23 lines (17 loc) · 798 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
param([switch]$pack)
$ErrorActionPreference = "Stop"
function step($command) {
write-host ([Environment]::NewLine + $command.ToString().Trim()) -fore CYAN
& $command
if ($lastexitcode -ne 0) { throw $lastexitcode }
}
$fixie = "src/Fixie.Console/bin/Release/netcoreapp3.1/Fixie.Console.dll"
if (test-path artifacts) { remove-item artifacts -Recurse }
step { dotnet clean src -c Release --nologo -v minimal }
step { dotnet build src -c Release --nologo }
step { dotnet $fixie *.Tests -c Release --no-build }
if ($pack) {
step { dotnet pack src/Fixie -o artifacts -c Release --no-build --nologo }
step { dotnet pack src/Fixie.Console -o artifacts -c Release --no-build --nologo }
step { dotnet pack src/Fixie.TestAdapter -o artifacts -c Release --no-build --nologo }
}