You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
24
external/linker/eng/common/build.ps1
vendored
24
external/linker/eng/common/build.ps1
vendored
@@ -1,6 +1,7 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string][Alias('c')]$configuration = "Debug",
|
||||
[string]$platform = $null,
|
||||
[string] $projects,
|
||||
[string][Alias('v')]$verbosity = "minimal",
|
||||
[string] $msbuildEngine = $null,
|
||||
@@ -11,7 +12,7 @@ Param(
|
||||
[switch][Alias('b')]$build,
|
||||
[switch] $rebuild,
|
||||
[switch] $deploy,
|
||||
[switch] $test,
|
||||
[switch][Alias('t')]$test,
|
||||
[switch] $integrationTest,
|
||||
[switch] $performanceTest,
|
||||
[switch] $sign,
|
||||
@@ -29,6 +30,7 @@ Param(
|
||||
function Print-Usage() {
|
||||
Write-Host "Common settings:"
|
||||
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
|
||||
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
Write-Host " -binaryLog Output binary log (short: -bl)"
|
||||
Write-Host " -help Print help and exit"
|
||||
@@ -40,10 +42,10 @@ function Print-Usage() {
|
||||
Write-Host " -rebuild Rebuild solution"
|
||||
Write-Host " -deploy Deploy built VSIXes"
|
||||
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
|
||||
Write-Host " -test Run all unit tests in the solution"
|
||||
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
|
||||
Write-Host " -test Run all unit tests in the solution (short: -t)"
|
||||
Write-Host " -integrationTest Run all integration tests in the solution"
|
||||
Write-Host " -performanceTest Run all performance tests in the solution"
|
||||
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
|
||||
Write-Host " -sign Sign build outputs"
|
||||
Write-Host " -publish Publish artifacts (e.g. symbols)"
|
||||
Write-Host ""
|
||||
@@ -51,9 +53,11 @@ function Print-Usage() {
|
||||
Write-Host "Advanced settings:"
|
||||
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
|
||||
Write-Host " -ci Set when running on CI server"
|
||||
Write-Host " -prepareMachine Prepare machine for CI run"
|
||||
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Command line arguments not listed above are passed thru to msbuild."
|
||||
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
|
||||
}
|
||||
@@ -75,6 +79,7 @@ function Build {
|
||||
InitializeCustomToolset
|
||||
|
||||
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
|
||||
$platformArg = if ($platform) { "/p:Platform=$platform" } else { "" }
|
||||
|
||||
if ($projects) {
|
||||
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
|
||||
@@ -86,6 +91,7 @@ function Build {
|
||||
|
||||
MSBuild $toolsetBuildProj `
|
||||
$bl `
|
||||
$platformArg `
|
||||
/p:Configuration=$configuration `
|
||||
/p:RepoRoot=$RepoRoot `
|
||||
/p:Restore=$restore `
|
||||
@@ -99,12 +105,11 @@ function Build {
|
||||
/p:PerformanceTest=$performanceTest `
|
||||
/p:Sign=$sign `
|
||||
/p:Publish=$publish `
|
||||
/p:ContinuousIntegrationBuild=$ci `
|
||||
@properties
|
||||
}
|
||||
|
||||
try {
|
||||
if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
|
||||
Print-Usage
|
||||
exit 0
|
||||
}
|
||||
@@ -121,12 +126,15 @@ try {
|
||||
. $configureToolsetScript
|
||||
}
|
||||
|
||||
if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) {
|
||||
InitializeNativeTools
|
||||
}
|
||||
|
||||
Build
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user