From 2098132e3cd153c43b449b26037f36046e1de411 Mon Sep 17 00:00:00 2001 From: Zachary Taylor Date: Wed, 1 Jan 2025 23:55:11 +0000 Subject: [PATCH 1/3] Remove logic for azureedge.net fallback in preparation for install script changes (v3) --- dist/setup/index.js | 1 - src/installer.ts | 16 +++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index d719bfdd8..270964582 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -71286,7 +71286,6 @@ class DotnetVersionResolver { } exports.DotnetVersionResolver = DotnetVersionResolver; 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 DotnetCoreInstaller { constructor(version, quality) { this.version = version; diff --git a/src/installer.ts b/src/installer.ts index 027f095a2..488379c1e 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -102,16 +102,9 @@ export class DotnetVersionResolver { maxRetries: 3 }); - let response; - try { - response = await httpClient.getJson( - DotnetVersionResolver.DotNetCoreIndexUrl - ); - } catch (error) { - response = await httpClient.getJson( - DotnetVersionResolver.DotnetCoreIndexFallbackUrl - ); - } + const response = await httpClient.getJson( + DotnetVersionResolver.DotNetCoreIndexUrl + ); const result = response.result || {}; const releasesInfo: any[] = result['releases-index']; @@ -132,9 +125,6 @@ export class DotnetVersionResolver { 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'; } export class DotnetCoreInstaller { From 09ce5821b4ee71a4339ed454178d5e56b162e351 Mon Sep 17 00:00:00 2001 From: Zachary Taylor Date: Thu, 2 Jan 2025 01:51:42 +0000 Subject: [PATCH 2/3] remove fallback in index.js --- dist/setup/index.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 270964582..850efce02 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -71264,13 +71264,8 @@ class DotnetVersionResolver { allowRetries: true, maxRetries: 3 }); - let response; - try { - response = yield httpClient.getJson(DotnetVersionResolver.DotNetCoreIndexUrl); - } - catch (error) { - response = yield httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexFallbackUrl); - } + + const response = yield httpClient.getJson(DotnetVersionResolver.DotNetCoreIndexUrl); const result = response.result || {}; const releasesInfo = result['releases-index']; const releaseInfo = releasesInfo.find(info => { From b9b8d313b1bf90ed2873a3111cd690c1fb199a32 Mon Sep 17 00:00:00 2001 From: Zachary Taylor Date: Thu, 2 Jan 2025 01:57:00 +0000 Subject: [PATCH 3/3] fix ci --- dist/setup/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 850efce02..f1d37d2a2 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -71264,7 +71264,6 @@ class DotnetVersionResolver { allowRetries: true, maxRetries: 3 }); - const response = yield httpClient.getJson(DotnetVersionResolver.DotNetCoreIndexUrl); const result = response.result || {}; const releasesInfo = result['releases-index'];