|
|
|
@ -77383,7 +77383,10 @@ function getInfoFromManifest(versionSpec_1, stable_1, auth_1) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function getInfoFromDist(versionSpec, arch, goDownloadBaseUrl) {
|
|
|
|
function getInfoFromDist(versionSpec, arch, goDownloadBaseUrl) {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
const version = yield findMatch(versionSpec, arch);
|
|
|
|
const dlUrl = goDownloadBaseUrl
|
|
|
|
|
|
|
|
? `${goDownloadBaseUrl}/?mode=json&include=all`
|
|
|
|
|
|
|
|
: GOLANG_DOWNLOAD_URL;
|
|
|
|
|
|
|
|
const version = yield findMatch(versionSpec, arch, dlUrl);
|
|
|
|
if (!version) {
|
|
|
|
if (!version) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -77421,12 +77424,12 @@ function getInfoFromDirectDownload(versionSpec, arch, goDownloadBaseUrl) {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function findMatch(versionSpec_1) {
|
|
|
|
function findMatch(versionSpec_1) {
|
|
|
|
return __awaiter(this, arguments, void 0, function* (versionSpec, arch = os_1.default.arch()) {
|
|
|
|
return __awaiter(this, arguments, void 0, function* (versionSpec, arch = os_1.default.arch(), dlUrl = GOLANG_DOWNLOAD_URL) {
|
|
|
|
const archFilter = sys.getArch(arch);
|
|
|
|
const archFilter = sys.getArch(arch);
|
|
|
|
const platFilter = sys.getPlatform();
|
|
|
|
const platFilter = sys.getPlatform();
|
|
|
|
let result;
|
|
|
|
let result;
|
|
|
|
let match;
|
|
|
|
let match;
|
|
|
|
const candidates = yield module.exports.getVersionsDist(GOLANG_DOWNLOAD_URL);
|
|
|
|
const candidates = yield module.exports.getVersionsDist(dlUrl);
|
|
|
|
if (!candidates) {
|
|
|
|
if (!candidates) {
|
|
|
|
throw new Error(`golang download url did not return results`);
|
|
|
|
throw new Error(`golang download url did not return results`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|