Skip to content

Commit

Permalink
V4 - Use new .NET CDN URLs and update to latest install scripts (#566)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
heavymachinery authored Dec 26, 2024
1 parent e4c228a commit 87b7050
Show file tree
Hide file tree
Showing 4 changed files with 1,704 additions and 1,608 deletions.
11 changes: 9 additions & 2 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93806,7 +93806,13 @@ class DotnetVersionResolver {
allowRetries: true,
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 releasesInfo = result['releases-index'];
const releaseInfo = releasesInfo.find(info => {
Expand All @@ -93821,7 +93827,8 @@ class 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 {
constructor() {
this.scriptName = utils_1.IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh';
Expand Down
Loading

0 comments on commit 87b7050

Please sign in to comment.