mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-04-04 22:39:50 +00:00
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:
11
dist/setup/index.js
vendored
11
dist/setup/index.js
vendored
@ -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 => {
|
||||
@ -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';
|
||||
|
Reference in New Issue
Block a user