|
|
|
@ -63231,9 +63231,13 @@ function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
let manifest;
|
|
|
|
|
let osPlat = os_1.default.platform();
|
|
|
|
|
if (versionSpec === utils_1.StableReleaseAlias.Stable ||
|
|
|
|
|
versionSpec === utils_1.StableReleaseAlias.OldStable) {
|
|
|
|
|
manifest = yield getManifest(auth);
|
|
|
|
|
versionSpec = yield resolveStableVersionInput(versionSpec, auth, arch, manifest);
|
|
|
|
|
}
|
|
|
|
|
if (checkLatest) {
|
|
|
|
|
core.info('Attempting to resolve the latest version from the manifest...');
|
|
|
|
|
manifest = yield getManifest(auth);
|
|
|
|
|
const resolvedVersion = yield resolveVersionFromManifest(versionSpec, true, auth, arch, manifest);
|
|
|
|
|
if (resolvedVersion) {
|
|
|
|
|
versionSpec = resolvedVersion;
|
|
|
|
@ -63243,11 +63247,6 @@ function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
|
|
|
|
core.info(`Failed to resolve version ${versionSpec} from manifest`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (versionSpec === utils_1.StableReleaseAlias.Stable ||
|
|
|
|
|
versionSpec === utils_1.StableReleaseAlias.OldStable) {
|
|
|
|
|
manifest !== null && manifest !== void 0 ? manifest : (manifest = yield getManifest(auth));
|
|
|
|
|
versionSpec = yield resolveStableVersionInput(versionSpec, auth, arch, manifest);
|
|
|
|
|
}
|
|
|
|
|
// check cache
|
|
|
|
|
let toolPath;
|
|
|
|
|
toolPath = tc.find('go', versionSpec, arch);
|
|
|
|
@ -63263,7 +63262,7 @@ function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
|
|
|
|
// Try download from internal distribution (popular versions only)
|
|
|
|
|
//
|
|
|
|
|
try {
|
|
|
|
|
info = yield getInfoFromManifest(versionSpec, true, auth, arch);
|
|
|
|
|
info = yield getInfoFromManifest(versionSpec, true, auth, arch, manifest);
|
|
|
|
|
if (info) {
|
|
|
|
|
downloadPath = yield installGoVersion(info, auth, arch);
|
|
|
|
|
}
|
|
|
|
@ -63309,6 +63308,7 @@ function resolveVersionFromManifest(versionSpec, stable, auth, arch, manifest) {
|
|
|
|
|
return info === null || info === void 0 ? void 0 : info.resolvedVersion;
|
|
|
|
|
}
|
|
|
|
|
catch (err) {
|
|
|
|
|
console.log('didnt fail');
|
|
|
|
|
core.info('Unable to resolve a version from the manifest...');
|
|
|
|
|
core.debug(err.message);
|
|
|
|
|
}
|
|
|
|
@ -63361,6 +63361,7 @@ function getInfoFromManifest(versionSpec, stable, auth, arch = os_1.default.arch
|
|
|
|
|
core.debug('No manifest cached');
|
|
|
|
|
manifest = yield getManifest(auth);
|
|
|
|
|
}
|
|
|
|
|
console.log('didnt fail898998');
|
|
|
|
|
core.info(`matching ${versionSpec}...`);
|
|
|
|
|
const rel = yield tc.findFromManifest(versionSpec, stable, manifest, arch);
|
|
|
|
|
if (rel && rel.files.length > 0) {
|
|
|
|
|