V4 - Use new .NET CDN URLs and update to latest install scripts (#566)

* Use new .NET CDN URL

* Update to latest install-dotnet scripts

* Use signed version of new `install-dotnet.ps1`

* Add fallback to old CDN URL
This commit is contained in:
Dylan 2024-12-26 14:21:39 -08:00 committed by GitHub
parent e4c228a841
commit 87b7050bc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1704 additions and 1608 deletions

11
dist/setup/index.js vendored
View File

@ -93806,7 +93806,13 @@ class DotnetVersionResolver {
allowRetries: true, allowRetries: true,
maxRetries: 3 maxRetries: 3
}); });
const response = yield httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexUrl); let response;
try {
response = yield httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexUrl);
}
catch (error) {
response = yield httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexFallbackUrl);
}
const result = response.result || {}; const result = response.result || {};
const releasesInfo = result['releases-index']; const releasesInfo = result['releases-index'];
const releaseInfo = releasesInfo.find(info => { const releaseInfo = releasesInfo.find(info => {
@ -93821,7 +93827,8 @@ class DotnetVersionResolver {
} }
} }
exports.DotnetVersionResolver = DotnetVersionResolver; exports.DotnetVersionResolver = DotnetVersionResolver;
DotnetVersionResolver.DotnetCoreIndexUrl = 'https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json'; DotnetVersionResolver.DotnetCoreIndexUrl = 'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';
DotnetVersionResolver.DotnetCoreIndexFallbackUrl = 'https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json';
class DotnetInstallScript { class DotnetInstallScript {
constructor() { constructor() {
this.scriptName = utils_1.IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh'; this.scriptName = utils_1.IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh';

View File

@ -111,35 +111,35 @@
#> #>
[cmdletbinding()] [cmdletbinding()]
param( param(
[string]$Channel="LTS", [string]$Channel = "LTS",
[string]$Quality, [string]$Quality,
[string]$Version="Latest", [string]$Version = "Latest",
[switch]$Internal, [switch]$Internal,
[string]$JSonFile, [string]$JSonFile,
[Alias('i')][string]$InstallDir="<auto>", [Alias('i')][string]$InstallDir = "<auto>",
[string]$Architecture="<auto>", [string]$Architecture = "<auto>",
[string]$Runtime, [string]$Runtime,
[Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")] [Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")]
[switch]$SharedRuntime, [switch]$SharedRuntime,
[switch]$DryRun, [switch]$DryRun,
[switch]$NoPath, [switch]$NoPath,
[string]$AzureFeed, [string]$AzureFeed,
[string]$UncachedFeed, [string]$UncachedFeed,
[string]$FeedCredential, [string]$FeedCredential,
[string]$ProxyAddress, [string]$ProxyAddress,
[switch]$ProxyUseDefaultCredentials, [switch]$ProxyUseDefaultCredentials,
[string[]]$ProxyBypassList=@(), [string[]]$ProxyBypassList = @(),
[switch]$SkipNonVersionedFiles, [switch]$SkipNonVersionedFiles,
[switch]$NoCdn, [switch]$NoCdn,
[int]$DownloadTimeout=1200, [int]$DownloadTimeout = 1200,
[switch]$KeepZip, [switch]$KeepZip,
[string]$ZipPath=[System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()), [string]$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()),
[switch]$Help [switch]$Help
) )
Set-StrictMode -Version Latest Set-StrictMode -Version Latest
$ErrorActionPreference="Stop" $ErrorActionPreference = "Stop"
$ProgressPreference="SilentlyContinue" $ProgressPreference = "SilentlyContinue"
function Say($str) { function Say($str) {
try { try {
@ -243,14 +243,13 @@ function Get-Machine-Architecture() {
# To get the correct architecture, we need to use PROCESSOR_ARCHITEW6432. # To get the correct architecture, we need to use PROCESSOR_ARCHITEW6432.
# PS x64 doesn't define this, so we fall back to PROCESSOR_ARCHITECTURE. # PS x64 doesn't define this, so we fall back to PROCESSOR_ARCHITECTURE.
# Possible values: amd64, x64, x86, arm64, arm # Possible values: amd64, x64, x86, arm64, arm
if( $ENV:PROCESSOR_ARCHITEW6432 -ne $null ) { if ( $ENV:PROCESSOR_ARCHITEW6432 -ne $null ) {
return $ENV:PROCESSOR_ARCHITEW6432 return $ENV:PROCESSOR_ARCHITEW6432
} }
try { try {
if( ((Get-CimInstance -ClassName CIM_OperatingSystem).OSArchitecture) -like "ARM*") { if ( ((Get-CimInstance -ClassName CIM_OperatingSystem).OSArchitecture) -like "ARM*") {
if( [Environment]::Is64BitOperatingSystem ) if ( [Environment]::Is64BitOperatingSystem ) {
{
return "arm64" return "arm64"
} }
return "arm" return "arm"
@ -279,13 +278,13 @@ function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
} }
} }
function ValidateFeedCredential([string] $FeedCredential) function ValidateFeedCredential([string] $FeedCredential) {
{
if ($Internal -and [string]::IsNullOrWhitespace($FeedCredential)) { if ($Internal -and [string]::IsNullOrWhitespace($FeedCredential)) {
$message = "Provide credentials via -FeedCredential parameter." $message = "Provide credentials via -FeedCredential parameter."
if ($DryRun) { if ($DryRun) {
Say-Warning "$message" Say-Warning "$message"
} else { }
else {
throw "$message" throw "$message"
} }
} }
@ -362,7 +361,7 @@ function Get-Version-From-LatestVersion-File-Content([string]$VersionText) {
$VersionInfo = @{ $VersionInfo = @{
CommitHash = $(if ($Data.Count -gt 1) { $Data[0] }) CommitHash = $(if ($Data.Count -gt 1) { $Data[0] })
Version = $Data[-1] # last line is always the version number. Version = $Data[-1] # last line is always the version number.
} }
return $VersionInfo return $VersionInfo
} }
@ -377,8 +376,7 @@ function Load-Assembly([string] $Assembly) {
} }
} }
function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect, [bool]$DisableFeedCredential) function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect, [bool]$DisableFeedCredential) {
{
$cts = New-Object System.Threading.CancellationTokenSource $cts = New-Object System.Threading.CancellationTokenSource
$downloadScript = { $downloadScript = {
@ -389,19 +387,21 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
# HttpClient is used vs Invoke-WebRequest in order to support Nano Server which doesn't support the Invoke-WebRequest cmdlet. # HttpClient is used vs Invoke-WebRequest in order to support Nano Server which doesn't support the Invoke-WebRequest cmdlet.
Load-Assembly -Assembly System.Net.Http Load-Assembly -Assembly System.Net.Http
if(-not $ProxyAddress) { if (-not $ProxyAddress) {
try { try {
# Despite no proxy being explicitly specified, we may still be behind a default proxy # Despite no proxy being explicitly specified, we may still be behind a default proxy
$DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy; $DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) { if ($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) {
if ($null -ne $DefaultProxy.GetProxy($Uri)) { if ($null -ne $DefaultProxy.GetProxy($Uri)) {
$ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString $ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
} else { }
else {
$ProxyAddress = $null $ProxyAddress = $null
} }
$ProxyUseDefaultCredentials = $true $ProxyUseDefaultCredentials = $true
} }
} catch { }
catch {
# Eat the exception and move forward as the above code is an attempt # Eat the exception and move forward as the above code is an attempt
# at resolving the DefaultProxy that may not have been a problem. # at resolving the DefaultProxy that may not have been a problem.
$ProxyAddress = $null $ProxyAddress = $null
@ -410,15 +410,14 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
} }
$HttpClientHandler = New-Object System.Net.Http.HttpClientHandler $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler
if($ProxyAddress) { if ($ProxyAddress) {
$HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{ $HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{
Address=$ProxyAddress; Address = $ProxyAddress;
UseDefaultCredentials=$ProxyUseDefaultCredentials; UseDefaultCredentials = $ProxyUseDefaultCredentials;
BypassList = $ProxyBypassList; BypassList = $ProxyBypassList;
} }
} }
if ($DisableRedirect) if ($DisableRedirect) {
{
$HttpClientHandler.AllowAutoRedirect = $false $HttpClientHandler.AllowAutoRedirect = $false
} }
$HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler
@ -427,7 +426,7 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
# Defaulting to 20 minutes allows it to work over much slower connections. # Defaulting to 20 minutes allows it to work over much slower connections.
$HttpClient.Timeout = New-TimeSpan -Seconds $DownloadTimeout $HttpClient.Timeout = New-TimeSpan -Seconds $DownloadTimeout
if ($HeaderOnly){ if ($HeaderOnly) {
$completionOption = [System.Net.Http.HttpCompletionOption]::ResponseHeadersRead $completionOption = [System.Net.Http.HttpCompletionOption]::ResponseHeadersRead
} }
else { else {
@ -452,8 +451,7 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
$DownloadException.Data["StatusCode"] = [int] $Response.StatusCode $DownloadException.Data["StatusCode"] = [int] $Response.StatusCode
$DownloadException.Data["ErrorMessage"] = "Unable to download $Uri. Returned HTTP status code: " + $DownloadException.Data["StatusCode"] $DownloadException.Data["ErrorMessage"] = "Unable to download $Uri. Returned HTTP status code: " + $DownloadException.Data["StatusCode"]
if (404 -eq [int] $Response.StatusCode) if (404 -eq [int] $Response.StatusCode) {
{
$cts.Cancel() $cts.Cancel()
} }
} }
@ -470,8 +468,8 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
$CurrentException = $PSItem.Exception $CurrentException = $PSItem.Exception
$ErrorMsg = $CurrentException.Message + "`r`n" $ErrorMsg = $CurrentException.Message + "`r`n"
while ($CurrentException.InnerException) { while ($CurrentException.InnerException) {
$CurrentException = $CurrentException.InnerException $CurrentException = $CurrentException.InnerException
$ErrorMsg += $CurrentException.Message + "`r`n" $ErrorMsg += $CurrentException.Message + "`r`n"
} }
# Check if there is an issue concerning TLS. # Check if there is an issue concerning TLS.
@ -483,7 +481,7 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
throw $DownloadException throw $DownloadException
} }
finally { finally {
if ($null -ne $HttpClient) { if ($null -ne $HttpClient) {
$HttpClient.Dispose() $HttpClient.Dispose()
} }
} }
@ -492,10 +490,8 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
try { try {
return Invoke-With-Retry $downloadScript $cts.Token return Invoke-With-Retry $downloadScript $cts.Token
} }
finally finally {
{ if ($null -ne $cts) {
if ($null -ne $cts)
{
$cts.Dispose() $cts.Dispose()
} }
} }
@ -613,11 +609,9 @@ function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string
elseif ($Runtime -eq "windowsdesktop") { elseif ($Runtime -eq "windowsdesktop") {
# The windows desktop runtime is part of the core runtime layout prior to 5.0 # The windows desktop runtime is part of the core runtime layout prior to 5.0
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip"
if ($SpecificVersion -match '^(\d+)\.(.*)$') if ($SpecificVersion -match '^(\d+)\.(.*)$') {
{
$majorVersion = [int]$Matches[1] $majorVersion = [int]$Matches[1]
if ($majorVersion -ge 5) if ($majorVersion -ge 5) {
{
$PayloadURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" $PayloadURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip"
} }
} }
@ -667,8 +661,7 @@ function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion, [stri
if ($productVersionResponse.StatusCode -eq 200) { if ($productVersionResponse.StatusCode -eq 200) {
$productVersion = $productVersionResponse.Content.ReadAsStringAsync().Result.Trim() $productVersion = $productVersionResponse.Content.ReadAsStringAsync().Result.Trim()
if ($productVersion -ne $SpecificVersion) if ($productVersion -ne $SpecificVersion) {
{
Say "Using alternate version $productVersion found in $ProductVersionTxtURL" Say "Using alternate version $productVersion found in $ProductVersionTxtURL"
} }
return $productVersion return $productVersion
@ -683,8 +676,7 @@ function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion, [stri
} }
# Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number. # Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number.
if ([string]::IsNullOrEmpty($PackageDownloadLink)) if ([string]::IsNullOrEmpty($PackageDownloadLink)) {
{
Say-Verbose "Using the default value '$SpecificVersion' as the product version." Say-Verbose "Using the default value '$SpecificVersion' as the product version."
return $SpecificVersion return $SpecificVersion
} }
@ -696,21 +688,21 @@ function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion, [stri
function Get-Product-Version-Url([string]$AzureFeed, [string]$SpecificVersion, [string]$PackageDownloadLink, [bool]$Flattened) { function Get-Product-Version-Url([string]$AzureFeed, [string]$SpecificVersion, [string]$PackageDownloadLink, [bool]$Flattened) {
Say-Invocation $MyInvocation Say-Invocation $MyInvocation
$majorVersion=$null $majorVersion = $null
if ($SpecificVersion -match '^(\d+)\.(.*)') { if ($SpecificVersion -match '^(\d+)\.(.*)') {
$majorVersion = $Matches[1] -as[int] $majorVersion = $Matches[1] -as [int]
} }
$pvFileName='productVersion.txt' $pvFileName = 'productVersion.txt'
if($Flattened) { if ($Flattened) {
if(-not $Runtime) { if (-not $Runtime) {
$pvFileName='sdk-productVersion.txt' $pvFileName = 'sdk-productVersion.txt'
} }
elseif($Runtime -eq "dotnet") { elseif ($Runtime -eq "dotnet") {
$pvFileName='runtime-productVersion.txt' $pvFileName = 'runtime-productVersion.txt'
} }
else { else {
$pvFileName="$Runtime-productVersion.txt" $pvFileName = "$Runtime-productVersion.txt"
} }
} }
@ -736,7 +728,7 @@ function Get-Product-Version-Url([string]$AzureFeed, [string]$SpecificVersion, [
} }
} }
else { else {
$ProductVersionTxtURL = $PackageDownloadLink.Substring(0, $PackageDownloadLink.LastIndexOf("/")) + "/$pvFileName" $ProductVersionTxtURL = $PackageDownloadLink.Substring(0, $PackageDownloadLink.LastIndexOf("/")) + "/$pvFileName"
} }
Say-Verbose "Constructed productVersion link: $ProductVersionTxtURL" Say-Verbose "Constructed productVersion link: $ProductVersionTxtURL"
@ -744,16 +736,14 @@ function Get-Product-Version-Url([string]$AzureFeed, [string]$SpecificVersion, [
return $ProductVersionTxtURL return $ProductVersionTxtURL
} }
function Get-ProductVersionFromDownloadLink([string]$PackageDownloadLink, [string]$SpecificVersion) function Get-ProductVersionFromDownloadLink([string]$PackageDownloadLink, [string]$SpecificVersion) {
{
Say-Invocation $MyInvocation Say-Invocation $MyInvocation
#product specific version follows the product name #product specific version follows the product name
#for filename 'dotnet-sdk-3.1.404-win-x64.zip': the product version is 3.1.400 #for filename 'dotnet-sdk-3.1.404-win-x64.zip': the product version is 3.1.400
$filename = $PackageDownloadLink.Substring($PackageDownloadLink.LastIndexOf("/") + 1) $filename = $PackageDownloadLink.Substring($PackageDownloadLink.LastIndexOf("/") + 1)
$filenameParts = $filename.Split('-') $filenameParts = $filename.Split('-')
if ($filenameParts.Length -gt 2) if ($filenameParts.Length -gt 2) {
{
$productVersion = $filenameParts[2] $productVersion = $filenameParts[2]
Say-Verbose "Extracted product version '$productVersion' from download link '$PackageDownloadLink'." Say-Verbose "Extracted product version '$productVersion' from download link '$PackageDownloadLink'."
} }
@ -788,12 +778,13 @@ function Resolve-Installation-Path([string]$InstallDir) {
function Test-User-Write-Access([string]$InstallDir) { function Test-User-Write-Access([string]$InstallDir) {
try { try {
$tempFileName=[guid]::NewGuid().ToString() $tempFileName = [guid]::NewGuid().ToString()
$tempFilePath=Join-Path -Path $InstallDir -ChildPath $tempFileName $tempFilePath = Join-Path -Path $InstallDir -ChildPath $tempFileName
New-Item -Path $tempFilePath -ItemType File -Force New-Item -Path $tempFilePath -ItemType File -Force
Remove-Item $tempFilePath -Force Remove-Item $tempFilePath -Force
return $true return $true
} catch { }
catch {
return $false return $false
} }
} }
@ -873,7 +864,7 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
if (($null -eq $PathWithVersion) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) { if (($null -eq $PathWithVersion) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
$DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName) $DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName)
$DestinationDir = Split-Path -Parent $DestinationPath $DestinationDir = Split-Path -Parent $DestinationPath
$OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath)) $OverrideFiles = $OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath))
if ((-Not $DestinationPath.EndsWith("\")) -And $OverrideFiles) { if ((-Not $DestinationPath.EndsWith("\")) -And $OverrideFiles) {
New-Item -ItemType Directory -Force -Path $DestinationDir | Out-Null New-Item -ItemType Directory -Force -Path $DestinationDir | Out-Null
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $DestinationPath, $OverrideNonVersionedFiles) [System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $DestinationPath, $OverrideNonVersionedFiles)
@ -881,8 +872,7 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
} }
} }
} }
catch catch {
{
Say-Error "Failed to extract package. Exception: $_" Say-Error "Failed to extract package. Exception: $_"
throw; throw;
} }
@ -969,7 +959,8 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot) {
if (-Not $env:path.Contains($SuffixedBinPath)) { if (-Not $env:path.Contains($SuffixedBinPath)) {
Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process." Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process."
$env:path = $SuffixedBinPath + $env:path $env:path = $SuffixedBinPath + $env:path
} else { }
else {
Say-Verbose "Current process PATH already contains `"$BinPath`"" Say-Verbose "Current process PATH already contains `"$BinPath`""
} }
} }
@ -978,36 +969,60 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot) {
} }
} }
function PrintDryRunOutput($Invocation, $DownloadLinks) function PrintDryRunOutput($Invocation, $DownloadLinks) {
{
Say "Payload URLs:" Say "Payload URLs:"
for ($linkIndex=0; $linkIndex -lt $DownloadLinks.count; $linkIndex++) { for ($linkIndex = 0; $linkIndex -lt $DownloadLinks.count; $linkIndex++) {
Say "URL #$linkIndex - $($DownloadLinks[$linkIndex].type): $($DownloadLinks[$linkIndex].downloadLink)" Say "URL #$linkIndex - $($DownloadLinks[$linkIndex].type): $($DownloadLinks[$linkIndex].downloadLink)"
} }
$RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`"" $RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`""
if ($Runtime -eq "dotnet") { if ($Runtime -eq "dotnet") {
$RepeatableCommand+=" -Runtime `"dotnet`"" $RepeatableCommand += " -Runtime `"dotnet`""
} }
elseif ($Runtime -eq "aspnetcore") { elseif ($Runtime -eq "aspnetcore") {
$RepeatableCommand+=" -Runtime `"aspnetcore`"" $RepeatableCommand += " -Runtime `"aspnetcore`""
} }
foreach ($key in $Invocation.BoundParameters.Keys) { foreach ($key in $Invocation.BoundParameters.Keys) {
if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version","Quality","FeedCredential") -contains $key)) { if (-not (@("Architecture", "Channel", "DryRun", "InstallDir", "Runtime", "SharedRuntime", "Version", "Quality", "FeedCredential") -contains $key)) {
$RepeatableCommand+=" -$key `"$($Invocation.BoundParameters[$key])`"" $RepeatableCommand += " -$key `"$($Invocation.BoundParameters[$key])`""
} }
} }
if ($Invocation.BoundParameters.Keys -contains "FeedCredential") { if ($Invocation.BoundParameters.Keys -contains "FeedCredential") {
$RepeatableCommand+=" -FeedCredential `"<feedCredential>`"" $RepeatableCommand += " -FeedCredential `"<feedCredential>`""
} }
Say "Repeatable invocation: $RepeatableCommand" Say "Repeatable invocation: $RepeatableCommand"
if ($SpecificVersion -ne $EffectiveVersion) if ($SpecificVersion -ne $EffectiveVersion) {
{
Say "NOTE: Due to finding a version manifest with this runtime, it would actually install with version '$EffectiveVersion'" Say "NOTE: Due to finding a version manifest with this runtime, it would actually install with version '$EffectiveVersion'"
} }
} }
# grab the 'stem' of the redirect and check it against all of our configured feeds,
# if it matches, we can be sure that the redirect is valid and we should use it for
# subsequent processing
function Sanitize-RedirectUrl([string]$url) {
$urlSegments = ([System.Uri]$url).Segments;
$urlStem = $urlSegments[2..($urlSegments.Length - 1)] -join "";
Write-Verbose "Checking configured feeds for the asset at $urlStem"
foreach ($prospectiveFeed in $feeds) {
$trialUrl = "$prospectiveFeed/$urlStem";
Write-Verbose "Checking $trialUrl"
try {
$trialResponse = Invoke-WebRequest -Uri $trialUrl -Method HEAD
if ($trialResponse.StatusCode -eq 200) {
Write-Verbose "Found a match at $trialUrl"
return $trialUrl;
}
else {
Write-Verbose "No match at $trialUrl"
}
}
catch {
Write-Verbose "Failed to check $trialUrl"
}
}
}
function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture) { function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture) {
Say-Invocation $MyInvocation Say-Invocation $MyInvocation
@ -1025,19 +1040,18 @@ function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Intern
} }
$akaMsLink += "/$Channel" $akaMsLink += "/$Channel"
if (-not [string]::IsNullOrEmpty($Quality)) { if (-not [string]::IsNullOrEmpty($Quality)) {
$akaMsLink +="/$Quality" $akaMsLink += "/$Quality"
} }
$akaMsLink +="/$Product-win-$Architecture.zip" $akaMsLink += "/$Product-win-$Architecture.zip"
Say-Verbose "Constructed aka.ms link: '$akaMsLink'." Say-Verbose "Constructed aka.ms link: '$akaMsLink'."
$akaMsDownloadLink=$null $akaMsDownloadLink = $null
for ($maxRedirections = 9; $maxRedirections -ge 0; $maxRedirections--) for ($maxRedirections = 9; $maxRedirections -ge 0; $maxRedirections--) {
{
#get HTTP response #get HTTP response
#do not pass credentials as a part of the $akaMsLink and do not apply credentials in the GetHTTPResponse function #do not pass credentials as a part of the $akaMsLink and do not apply credentials in the GetHTTPResponse function
#otherwise the redirect link would have credentials as well #otherwise the redirect link would have credentials as well
#it would result in applying credentials twice to the resulting link and thus breaking it, and in echoing credentials to the output as a part of redirect link #it would result in applying credentials twice to the resulting link and thus breaking it, and in echoing credentials to the output as a part of redirect link
$Response= GetHTTPResponse -Uri $akaMsLink -HeaderOnly $true -DisableRedirect $true -DisableFeedCredential $true $Response = GetHTTPResponse -Uri $akaMsLink -HeaderOnly $true -DisableRedirect $true -DisableFeedCredential $true
Say-Verbose "Received response:`n$Response" Say-Verbose "Received response:`n$Response"
if ([string]::IsNullOrEmpty($Response)) { if ([string]::IsNullOrEmpty($Response)) {
@ -1046,8 +1060,7 @@ function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Intern
} }
#if HTTP code is 301 (Moved Permanently), the redirect link exists #if HTTP code is 301 (Moved Permanently), the redirect link exists
if ($Response.StatusCode -eq 301) if ($Response.StatusCode -eq 301) {
{
try { try {
$akaMsDownloadLink = $Response.Headers.GetValues("Location")[0] $akaMsDownloadLink = $Response.Headers.GetValues("Location")[0]
@ -1066,9 +1079,13 @@ function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Intern
return $null return $null
} }
} }
elseif ((($Response.StatusCode -lt 300) -or ($Response.StatusCode -ge 400)) -and (-not [string]::IsNullOrEmpty($akaMsDownloadLink))) elseif ((($Response.StatusCode -lt 300) -or ($Response.StatusCode -ge 400)) -and (-not [string]::IsNullOrEmpty($akaMsDownloadLink))) {
{
# Redirections have ended. # Redirections have ended.
$actualRedirectUrl = Sanitize-RedirectUrl $akaMsDownloadLink
if ($null -ne $actualRedirectUrl) {
$akaMsDownloadLink = $actualRedirectUrl
}
return $akaMsDownloadLink return $akaMsDownloadLink
} }
@ -1084,7 +1101,7 @@ function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Intern
function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $NormalizedQuality, [bool] $Internal, [string] $ProductName, [string] $Architecture) { function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $NormalizedQuality, [bool] $Internal, [string] $ProductName, [string] $Architecture) {
$AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $ProductName -Architecture $Architecture $AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $ProductName -Architecture $Architecture
if ([string]::IsNullOrEmpty($AkaMsDownloadLink)){ if ([string]::IsNullOrEmpty($AkaMsDownloadLink)) {
if (-not [string]::IsNullOrEmpty($NormalizedQuality)) { if (-not [string]::IsNullOrEmpty($NormalizedQuality)) {
# if quality is specified - exit with error - there is no fallback approach # if quality is specified - exit with error - there is no fallback approach
Say-Error "Failed to locate the latest version in the channel '$NormalizedChannel' with '$NormalizedQuality' quality for '$ProductName', os: 'win', architecture: '$Architecture'." Say-Error "Failed to locate the latest version in the channel '$NormalizedChannel' with '$NormalizedQuality' quality for '$ProductName', os: 'win', architecture: '$Architecture'."
@ -1117,11 +1134,12 @@ function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $Normal
} }
} }
function Get-Feeds-To-Use() function Get-Feeds-To-Use() {
{
$feeds = @( $feeds = @(
"https://dotnetcli.azureedge.net/dotnet", "https://builds.dotnet.microsoft.com/dotnet"
"https://dotnetbuilds.azureedge.net/public" "https://dotnetcli.azureedge.net/dotnet"
"https://ci.dot.net/public"
"https://dotnetbuilds.azureedge.net/public"
) )
if (-not [string]::IsNullOrEmpty($AzureFeed)) { if (-not [string]::IsNullOrEmpty($AzureFeed)) {
@ -1130,8 +1148,8 @@ function Get-Feeds-To-Use()
if ($NoCdn) { if ($NoCdn) {
$feeds = @( $feeds = @(
"https://dotnetcli.blob.core.windows.net/dotnet", "https://dotnetcli.blob.core.windows.net/dotnet",
"https://dotnetbuilds.blob.core.windows.net/public" "https://dotnetbuilds.blob.core.windows.net/public"
) )
if (-not [string]::IsNullOrEmpty($UncachedFeed)) { if (-not [string]::IsNullOrEmpty($UncachedFeed)) {
@ -1139,6 +1157,8 @@ function Get-Feeds-To-Use()
} }
} }
Write-Verbose "Initialized feeds: $feeds"
return $feeds return $feeds
} }
@ -1192,8 +1212,7 @@ function Prepare-Install-Directory {
} }
} }
if ($Help) if ($Help) {
{
Get-Help $PSCommandPath -Examples Get-Help $PSCommandPath -Examples
exit exit
} }
@ -1241,13 +1260,12 @@ if ([string]::IsNullOrEmpty($JSonFile) -and ($Version -eq "latest")) {
($DownloadLink, $SpecificVersion, $EffectiveVersion) = Get-AkaMsLink-And-Version $NormalizedChannel $NormalizedQuality $Internal $NormalizedProduct $CLIArchitecture ($DownloadLink, $SpecificVersion, $EffectiveVersion) = Get-AkaMsLink-And-Version $NormalizedChannel $NormalizedQuality $Internal $NormalizedProduct $CLIArchitecture
if ($null -ne $DownloadLink) { if ($null -ne $DownloadLink) {
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$DownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='aka.ms'} $DownloadLinks += New-Object PSObject -Property @{downloadLink = "$DownloadLink"; specificVersion = "$SpecificVersion"; effectiveVersion = "$EffectiveVersion"; type = 'aka.ms' }
Say-Verbose "Generated aka.ms link $DownloadLink with version $EffectiveVersion" Say-Verbose "Generated aka.ms link $DownloadLink with version $EffectiveVersion"
if (-Not $DryRun) { if (-Not $DryRun) {
Say-Verbose "Checking if the version $EffectiveVersion is already installed" Say-Verbose "Checking if the version $EffectiveVersion is already installed"
if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion) if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion) {
{
Say "$assetName with version '$EffectiveVersion' is already installed." Say "$assetName with version '$EffectiveVersion' is already installed."
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
return return
@ -1258,34 +1276,31 @@ if ([string]::IsNullOrEmpty($JSonFile) -and ($Version -eq "latest")) {
# Primary and legacy links cannot be used if a quality was specified. # Primary and legacy links cannot be used if a quality was specified.
# If we already have an aka.ms link, no need to search the blob feeds. # If we already have an aka.ms link, no need to search the blob feeds.
if ([string]::IsNullOrEmpty($NormalizedQuality) -and 0 -eq $DownloadLinks.count) if ([string]::IsNullOrEmpty($NormalizedQuality) -and 0 -eq $DownloadLinks.count) {
{
foreach ($feed in $feeds) { foreach ($feed in $feeds) {
try { try {
$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $feed -Channel $Channel -Version $Version -JSonFile $JSonFile $SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $feed -Channel $Channel -Version $Version -JSonFile $JSonFile
$DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture $DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture $LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$DownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='primary'} $DownloadLinks += New-Object PSObject -Property @{downloadLink = "$DownloadLink"; specificVersion = "$SpecificVersion"; effectiveVersion = "$EffectiveVersion"; type = 'primary' }
Say-Verbose "Generated primary link $DownloadLink with version $EffectiveVersion" Say-Verbose "Generated primary link $DownloadLink with version $EffectiveVersion"
if (-not [string]::IsNullOrEmpty($LegacyDownloadLink)) { if (-not [string]::IsNullOrEmpty($LegacyDownloadLink)) {
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$LegacyDownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='legacy'} $DownloadLinks += New-Object PSObject -Property @{downloadLink = "$LegacyDownloadLink"; specificVersion = "$SpecificVersion"; effectiveVersion = "$EffectiveVersion"; type = 'legacy' }
Say-Verbose "Generated legacy link $LegacyDownloadLink with version $EffectiveVersion" Say-Verbose "Generated legacy link $LegacyDownloadLink with version $EffectiveVersion"
} }
if (-Not $DryRun) { if (-Not $DryRun) {
Say-Verbose "Checking if the version $EffectiveVersion is already installed" Say-Verbose "Checking if the version $EffectiveVersion is already installed"
if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion) if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion) {
{
Say "$assetName with version '$EffectiveVersion' is already installed." Say "$assetName with version '$EffectiveVersion' is already installed."
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
return return
} }
} }
} }
catch catch {
{
Say-Verbose "Failed to acquire download links from feed $feed. Exception: $_" Say-Verbose "Failed to acquire download links from feed $feed. Exception: $_"
} }
} }
@ -1308,8 +1323,7 @@ $DownloadSucceeded = $false
$DownloadedLink = $null $DownloadedLink = $null
$ErrorMessages = @() $ErrorMessages = @()
foreach ($link in $DownloadLinks) foreach ($link in $DownloadLinks) {
{
Say-Verbose "Downloading `"$($link.type)`" link $($link.downloadLink)" Say-Verbose "Downloading `"$($link.type)`" link $($link.downloadLink)"
try { try {
@ -1329,7 +1343,8 @@ foreach ($link in $DownloadLinks)
if ($PSItem.Exception.Data.Contains("ErrorMessage")) { if ($PSItem.Exception.Data.Contains("ErrorMessage")) {
$ErrorMessage = $PSItem.Exception.Data["ErrorMessage"] $ErrorMessage = $PSItem.Exception.Data["ErrorMessage"]
} else { }
else {
$ErrorMessage = $PSItem.Exception.Message $ErrorMessage = $PSItem.Exception.Message
} }
@ -1385,10 +1400,10 @@ Say "To check the list of supported versions, go to https://learn.microsoft.com/
Say "Installed version is $($DownloadedLink.effectiveVersion)" Say "Installed version is $($DownloadedLink.effectiveVersion)"
Say "Installation finished" Say "Installation finished"
# SIG # Begin signature block # SIG # Begin signature block
# MIIoOAYJKoZIhvcNAQcCoIIoKTCCKCUCAQExDzANBglghkgBZQMEAgEFADB5Bgor # MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDYphBPv3rmt1ZA # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAYvsOYTXPcgaBF
# JA1hMjk83/zFfoKJ/Mw+tp739UQWRKCCDYUwggYDMIID66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KQ5ftnk2UPFTPfFn8O2kyj12apbA
# CvNdDlLNMPmeNKGFaUA0Mov4JlPThpWAu/A8EZQywHlfW32RGQBHj39BpEl8K5pE
# ZGQYPnWZbUqFBrODhY7PnRKAfZ+HDZF2AugcNQ==
# SIG # End signature block # SIG # End signature block

View File

@ -1272,6 +1272,61 @@ downloadwget() {
return 0 return 0
} }
extract_stem() {
local url="$1"
# extract the protocol
proto="$(echo $1 | grep :// | sed -e's,^\(.*://\).*,\1,g')"
# remove the protocol
url="${1/$proto/}"
# extract the path (if any) - since we know all of our feeds have a first path segment, we can skip the first one. otherwise we'd use -f2- to get the full path
full_path="$(echo $url | grep / | cut -d/ -f2-)"
path="$(echo $full_path | cut -d/ -f2-)"
echo $path
}
check_url_exists() {
eval $invocation
local url="$1"
local code=""
if machine_has "curl"
then
code=$(curl --head -o /dev/null -w "%{http_code}" -s --fail "$url");
elif machine_has "wget"
then
# get the http response, grab the status code
server_response=$(wget -qO- --method=HEAD --server-response "$url" 2>&1)
code=$(echo "$server_response" | grep "HTTP/" | awk '{print $2}')
fi
if [ $code = "200" ]; then
return 0
else
return 1
fi
}
sanitize_redirect_url() {
eval $invocation
local url_stem
url_stem=$(extract_stem "$1")
say_verbose "Checking configured feeds for the asset at ${yellow:-}$url_stem${normal:-}"
for feed in "${feeds[@]}"
do
local trial_url="$feed/$url_stem"
say_verbose "Checking ${yellow:-}$trial_url${normal:-}"
if check_url_exists "$trial_url"; then
say_verbose "Found a match at ${yellow:-}$trial_url${normal:-}"
echo "$trial_url"
return 0
else
say_verbose "No match at ${yellow:-}$trial_url${normal:-}"
fi
done
return 1
}
get_download_link_from_aka_ms() { get_download_link_from_aka_ms() {
eval $invocation eval $invocation
@ -1324,6 +1379,11 @@ get_download_link_from_aka_ms() {
return 1 return 1
fi fi
sanitized_redirect_url=$(sanitize_redirect_url "$aka_ms_download_link")
if [[ -n "$sanitized_redirect_url" ]]; then
aka_ms_download_link="$sanitized_redirect_url"
fi
say_verbose "The redirect location retrieved: '$aka_ms_download_link'." say_verbose "The redirect location retrieved: '$aka_ms_download_link'."
return 0 return 0
else else
@ -1335,7 +1395,9 @@ get_download_link_from_aka_ms() {
get_feeds_to_use() get_feeds_to_use()
{ {
feeds=( feeds=(
"https://builds.dotnet.microsoft.com/dotnet"
"https://dotnetcli.azureedge.net/dotnet" "https://dotnetcli.azureedge.net/dotnet"
"https://ci.dot.net/public"
"https://dotnetbuilds.azureedge.net/public" "https://dotnetbuilds.azureedge.net/public"
) )

View File

@ -101,9 +101,18 @@ export class DotnetVersionResolver {
allowRetries: true, allowRetries: true,
maxRetries: 3 maxRetries: 3
}); });
const response = await httpClient.getJson<any>(
DotnetVersionResolver.DotnetCoreIndexUrl let response;
); try {
response = await httpClient.getJson<any>(
DotnetVersionResolver.DotnetCoreIndexUrl
);
} catch (error) {
response = await httpClient.getJson<any>(
DotnetVersionResolver.DotnetCoreIndexFallbackUrl
);
}
const result = response.result || {}; const result = response.result || {};
const releasesInfo: any[] = result['releases-index']; const releasesInfo: any[] = result['releases-index'];
@ -122,6 +131,8 @@ export class DotnetVersionResolver {
} }
static DotnetCoreIndexUrl = static DotnetCoreIndexUrl =
'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';
static DotnetCoreIndexFallbackUrl =
'https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json'; 'https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json';
} }