You've already forked linux-packaging-mono
Imported Upstream version 6.6.0.89
Former-commit-id: b39a328747c2f3414dc52e009fb6f0aa80ca2492
This commit is contained in:
parent
cf815e07e0
commit
95fdb59ea6
15
external/linker/eng/common/tools.ps1
vendored
15
external/linker/eng/common/tools.ps1
vendored
@@ -39,6 +39,10 @@
|
||||
# installed on the machine instead of downloading one.
|
||||
[bool]$useInstalledDotNetCli = if (Test-Path variable:useInstalledDotNetCli) { $useInstalledDotNetCli } else { $true }
|
||||
|
||||
# Enable repos to use a particular version of the on-line dotnet-install scripts.
|
||||
# default URL: https://dot.net/v1/dotnet-install.ps1
|
||||
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { "v1" }
|
||||
|
||||
# True to use global NuGet cache instead of restoring packages to repository-local directory.
|
||||
[bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci }
|
||||
|
||||
@@ -84,7 +88,7 @@ function Exec-Process([string]$command, [string]$commandArgs) {
|
||||
return $global:LASTEXITCODE = $process.ExitCode
|
||||
}
|
||||
finally {
|
||||
# If we didn't finish then an error occured or the user hit ctrl-c. Either
|
||||
# If we didn't finish then an error occurred or the user hit ctrl-c. Either
|
||||
# way kill the process
|
||||
if (-not $finished) {
|
||||
$process.Kill()
|
||||
@@ -147,7 +151,7 @@ function InitializeDotNetCli([bool]$install) {
|
||||
# It also ensures that VS msbuild will use the downloaded sdk targets.
|
||||
$env:PATH = "$dotnetRoot;$env:PATH"
|
||||
|
||||
# Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
|
||||
# Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
|
||||
Write-PipelinePrependPath -Path $dotnetRoot
|
||||
Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
|
||||
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
|
||||
@@ -159,7 +163,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
|
||||
$installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
|
||||
if (!(Test-Path $installScript)) {
|
||||
Create-Directory $dotnetRoot
|
||||
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile $installScript
|
||||
Invoke-WebRequest "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" -OutFile $installScript
|
||||
}
|
||||
|
||||
return $installScript
|
||||
@@ -169,7 +173,7 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
|
||||
InstallDotNet $dotnetRoot $version $architecture
|
||||
}
|
||||
|
||||
function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) { $installScript = GetDotNetInstallScript $dotnetRoot
|
||||
function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) {
|
||||
$installScript = GetDotNetInstallScript $dotnetRoot
|
||||
$installParameters = @{
|
||||
Version = $version
|
||||
@@ -518,6 +522,9 @@ function MSBuild-Core() {
|
||||
if ($warnAsError) {
|
||||
$cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
|
||||
}
|
||||
else {
|
||||
$cmdArgs += " /p:TreatWarningsAsErrors=false"
|
||||
}
|
||||
|
||||
foreach ($arg in $args) {
|
||||
if ($arg -ne $null -and $arg.Trim() -ne "") {
|
||||
|
||||
Reference in New Issue
Block a user