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

* New cdn url changes

* Fix CI failures on macos-latest

* Add Fallback logic

* Fix proxy failures

* Update signed version
This commit is contained in:
HarithaVattikuti
2024-12-26 14:05:33 -06:00
committed by GitHub
parent 608ee757cf
commit 71a4fd9b27
7 changed files with 2029 additions and 1555 deletions

View File

@@ -261,7 +261,12 @@ export class DotnetCoreInstaller {
httpClient: hc.HttpClient,
versionParts: string[]
): Promise<string> {
const response = await httpClient.getJson<any>(DotNetCoreIndexUrl);
let response;
try {
response = await httpClient.getJson<any>(DotNetCoreIndexUrl);
} catch (error) {
response = await httpClient.getJson<any>(DotnetCoreIndexFallbackUrl);
}
const result = response.result || {};
let releasesInfo: any[] = result['releases-index'];
@@ -300,4 +305,7 @@ export class DotnetCoreInstaller {
}
const DotNetCoreIndexUrl: string =
'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';
const DotnetCoreIndexFallbackUrl: string =
'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';