|
|
@ -63231,9 +63231,13 @@ function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
let manifest;
|
|
|
|
let manifest;
|
|
|
|
let osPlat = os_1.default.platform();
|
|
|
|
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) {
|
|
|
|
if (checkLatest) {
|
|
|
|
core.info('Attempting to resolve the latest version from the manifest...');
|
|
|
|
core.info('Attempting to resolve the latest version from the manifest...');
|
|
|
|
manifest = yield getManifest(auth);
|
|
|
|
|
|
|
|
const resolvedVersion = yield resolveVersionFromManifest(versionSpec, true, auth, arch, manifest);
|
|
|
|
const resolvedVersion = yield resolveVersionFromManifest(versionSpec, true, auth, arch, manifest);
|
|
|
|
if (resolvedVersion) {
|
|
|
|
if (resolvedVersion) {
|
|
|
|
versionSpec = 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`);
|
|
|
|
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
|
|
|
|
// check cache
|
|
|
|
let toolPath;
|
|
|
|
let toolPath;
|
|
|
|
toolPath = tc.find('go', versionSpec, arch);
|
|
|
|
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 download from internal distribution (popular versions only)
|
|
|
|
//
|
|
|
|
//
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
info = yield getInfoFromManifest(versionSpec, true, auth, arch);
|
|
|
|
info = yield getInfoFromManifest(versionSpec, true, auth, arch, manifest);
|
|
|
|
if (info) {
|
|
|
|
if (info) {
|
|
|
|
downloadPath = yield installGoVersion(info, auth, arch);
|
|
|
|
downloadPath = yield installGoVersion(info, auth, arch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|