Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 - Remove dotnetcli.blob.core.windows.net storage account fallback logic and update install scripts #576

Draft
wants to merge 3 commits into
base: restore-older-v2-release
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,7 @@ class DotnetCoreInstaller {
}
getReleasesJsonUrl(httpClient, versionParts) {
return __awaiter(this, void 0, void 0, function* () {
let response;
try {
response = yield httpClient.getJson(DotNetCoreIndexUrl);
}
catch (error) {
response = yield httpClient.getJson(DotnetCoreIndexFallbackUrl);
}
const response = yield httpClient.getJson(DotNetCoreIndexUrl);
const result = response.result || {};
let releasesInfo = result['releases-index'];
releasesInfo = releasesInfo.filter((info) => {
Expand All @@ -410,7 +404,6 @@ class DotnetCoreInstaller {
}
exports.DotnetCoreInstaller = DotnetCoreInstaller;
const DotNetCoreIndexUrl = 'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';
const DotnetCoreIndexFallbackUrl = 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';


/***/ }),
Expand Down
10 changes: 1 addition & 9 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,7 @@ export class DotnetCoreInstaller {
httpClient: hc.HttpClient,
versionParts: string[]
): Promise<string> {
let response;
try {
response = await httpClient.getJson<any>(DotNetCoreIndexUrl);
} catch (error) {
response = await httpClient.getJson<any>(DotnetCoreIndexFallbackUrl);
}
const response = await httpClient.getJson<any>(DotNetCoreIndexUrl);
const result = response.result || {};
let releasesInfo: any[] = result['releases-index'];

Expand Down Expand Up @@ -307,6 +302,3 @@ 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';
Loading