forked from Humanizr/Humanizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
21 lines (16 loc) · 651 Bytes
/
build.ps1
File metadata and controls
21 lines (16 loc) · 651 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
param(
[string]$target = "Test",
[string]$verbosity = "minimal",
[int]$maxCpuCount = 0
)
$msbuild = "msbuild.exe"
# Kill all MSBUILD.EXE processes because they could very likely have a lock against our
# MSBuild runner from when we last ran unit tests.
get-process -name "msbuild" -ea SilentlyContinue | %{ stop-process $_.ID -force }
if ($maxCpuCount -lt 1) {
$maxCpuCountText = $Env:MSBuildProcessorCount
} else {
$maxCpuCountText = ":$maxCpuCount"
}
$allArgs = @("build.proj", "/m$maxCpuCountText", "/nologo", "/verbosity:$verbosity", "/t:$target", "/property:RequestedVerbosity=$verbosity", $args)
& $msbuild $allArgs