-
Notifications
You must be signed in to change notification settings - Fork 753
Expand file tree
/
Copy pathbuild.ps1
More file actions
46 lines (40 loc) · 1.07 KB
/
build.ps1
File metadata and controls
46 lines (40 loc) · 1.07 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
[CmdletBinding(PositionalBinding=$false)]
param (
[string][Alias('c')]$configuration = "Release",
[string][Alias('v')]$verbosity = "minimal",
[switch]$ci,
[switch]$prepareMachine,
[string]$msbuildEngine = $null,
[switch][Alias('bl')]$binaryLog,
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch][Alias('pb')]$productBuild,
[switch]$fromVMR,
[bool]$nodeReuse = $true,
[Parameter(ValueFromRemainingArguments = $true)][string[]]$properties
)
. $PSScriptRoot\..\common\tools.ps1
function Build {
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
MSBuild "$PSScriptRoot\dotnet-build.proj" `
$bl `
/p:Configuration=$configuration `
/p:RepoRoot=$RepoRoot `
/p:DotNetBuild=$productBuild `
/p:DotNetBuildFromVMR=$fromVMR `
@properties
}
try {
if ($ci) {
if (-not $excludeCIBinarylog) {
$binaryLog = $true
}
$nodeReuse = $false
}
Build
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
}
ExitWithExitCode 0