Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>2020-09-03 11:34:10 +0300
committerGitHub <noreply@github.com>2020-09-03 11:34:10 +0300
commit9b2723d21e393ae6949af78b147a822ee060fce9 (patch)
tree33d6e76faf2f925d8d6ee0deffa52fccbe1f0b4e /eng/common/tools.ps1
parent341b8b22280e297daa7d96b4b8a9fa1d40d28aa9 (diff)
[master] Update dependencies from mono/linker dotnet/arcade dotnet/runtime-assets dotnet/xharness dotnet/icu (#41591)
[master] Update dependencies from mono/linker dotnet/arcade dotnet/runtime-assets dotnet/xharness dotnet/icu - Updates: - Microsoft.NET.ILLink.Tasks: from 6.0.0-alpha.1.20424.3 to 6.0.0-alpha.1.20451.1 - Updates: - Microsoft.DotNet.GenFacades: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.Build.Tasks.Feed: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.Build.Tasks.Packaging: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.CodeAnalysis: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.GenAPI: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.XUnitExtensions: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.Helix.Sdk: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.RemoteExecutor: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.VersionTools.Tasks: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.XUnitConsoleRunner: from 2.5.1-beta.20427.5 to 2.5.1-beta.20431.4 - Microsoft.DotNet.Arcade.Sdk: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Microsoft.DotNet.ApiCompat: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4 - Updates: - Microsoft.DotNet.XHarness.CLI: from 1.0.0-prerelease.20424.2 to 1.0.0-prerelease.20431.1 - Microsoft.DotNet.XHarness.TestRunners.Xunit: from 1.0.0-prerelease.20424.2 to 1.0.0-prerelease.20431.1 - Updates: - Microsoft.NETCore.Runtime.ICU.Transport: from 6.0.0-alpha.1.20428.1 to 6.0.0-alpha.1.20451.1 - Updates: - System.ComponentModel.TypeConverter.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1 - System.Drawing.Common.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1 - System.IO.Compression.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1 - System.IO.Packaging.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1 - System.Net.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1 - System.Private.Runtime.UnicodeData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1 - System.Security.Cryptography.X509Certificates.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1 - System.Windows.Extensions.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1 - fix Browser-related tests
Diffstat (limited to 'eng/common/tools.ps1')
-rw-r--r--eng/common/tools.ps171
1 files changed, 42 insertions, 29 deletions
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index c2e575c97cc..1bf215525b3 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -57,11 +57,15 @@ set-strictmode -version 2.0
$ErrorActionPreference = 'Stop'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
-# If specifies, provides an alternate path for getting .NET Core SDKs and Runtimes. This script will still try public sources first.
+# If specified, provides an alternate path for getting .NET Core SDKs and Runtimes. This script will still try public sources first.
[string]$runtimeSourceFeed = if (Test-Path variable:runtimeSourceFeed) { $runtimeSourceFeed } else { $null }
# Base-64 encoded SAS token that has permission to storage container described by $runtimeSourceFeed
[string]$runtimeSourceFeedKey = if (Test-Path variable:runtimeSourceFeedKey) { $runtimeSourceFeedKey } else { $null }
+# If false, use copy of dotnet-install from /eng/common/dotnet-install-scripts (for custom behaviors).
+# otherwise will fetch from public location.
+[bool]$useDefaultDotnetInstall = if (Test-Path variable:useDefaultDotnetInstall) { $useDefaultDotnetInstall } else { $false }
+
function Create-Directory ([string[]] $path) {
New-Item -Path $path -Force -ItemType 'Directory' | Out-Null
}
@@ -193,37 +197,46 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
function GetDotNetInstallScript([string] $dotnetRoot) {
$installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
if (!(Test-Path $installScript)) {
- Create-Directory $dotnetRoot
- $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
-
- $maxRetries = 5
- $retries = 1
-
- $uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
-
- while($true) {
- try {
- Write-Host "GET $uri"
- Invoke-WebRequest $uri -OutFile $installScript
- break
- }
- catch {
- Write-Host "Failed to download '$uri'"
- Write-Error $_.Exception.Message -ErrorAction Continue
- }
-
- if (++$retries -le $maxRetries) {
- $delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
- Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
- Start-Sleep -Seconds $delayInSeconds
- }
- else {
- throw "Unable to download file in $maxRetries attempts."
+ create-directory $dotnetroot
+
+ if ($useDefaultDotnetInstall)
+ {
+ $progresspreference = 'silentlycontinue' # don't display the console progress ui - it's a huge perf hit
+
+ $maxretries = 5
+ $retries = 1
+
+ $uri = "https://dot.net/$dotnetinstallscriptversion/dotnet-install.ps1"
+
+ while($true) {
+ try {
+ write-host "get $uri"
+ invoke-webrequest $uri -outfile $installscript
+ break
+ }
+ catch {
+ write-host "failed to download '$uri'"
+ write-error $_.exception.message -erroraction continue
+ }
+
+ if (++$retries -le $maxretries) {
+ $delayinseconds = [math]::pow(2, $retries) - 1 # exponential backoff
+ write-host "retrying. waiting for $delayinseconds seconds before next attempt ($retries of $maxretries)."
+ start-sleep -seconds $delayinseconds
+ }
+ else {
+ throw "unable to download file in $maxretries attempts."
+ }
}
-
+ }
+ else
+ {
+ # Use a special version of the script from eng/common that understands the existence of a "productVersion.txt" in a dotnet path.
+ # See https://github.com/dotnet/arcade/issues/6047 for details
+ $engCommonCopy = Resolve-Path (Join-Path $PSScriptRoot 'dotnet-install-scripts\dotnet-install.ps1')
+ Copy-Item $engCommonCopy -Destination $installScript -Force
}
}
-
return $installScript
}