minor changes

pull/299/head
Dmitry Shibanov 2 years ago
parent eb4d2dd387
commit f62329616a

@ -63484,11 +63484,17 @@ function resolveStableVersionInput(versionSpec, auth, arch = os_1.default.arch()
return __awaiter(this, void 0, void 0, function* () {
if (!manifest) {
core.debug('No manifest cached');
manifest = (yield getManifest(auth));
manifest = yield getManifest(auth);
}
const releases = manifest
.filter(release => !!release.files.find(file => file.arch === arch))
.map(release => release.version);
.map(item => {
const index = item.files.findIndex(item => item.arch === arch);
if (index === -1) {
return '';
}
return item.version;
})
.filter(item => !!item);
if (versionSpec === utils_1.StableReleaseAlias.Stable) {
core.info(`stable version resolved as ${releases[0]}`);
return releases[0];

@ -66,7 +66,7 @@ export async function getGo(
versionSpec,
auth,
arch,
manifest as (tc.IToolRelease & IGoVersion)[]
manifest
);
}
@ -279,7 +279,7 @@ export async function findMatch(
versionSpec,
undefined,
arch,
fixedCandidates as (tc.IToolRelease & IGoVersion)[]
fixedCandidates
);
}
@ -375,16 +375,22 @@ export async function resolveStableVersionInput(
versionSpec: string,
auth: string | undefined,
arch = os.arch(),
manifest: (tc.IToolRelease & IGoVersion)[] | undefined
manifest: tc.IToolRelease[] | IGoVersion[] | undefined
): Promise<string> {
if (!manifest) {
core.debug('No manifest cached');
manifest = (await getManifest(auth)) as (tc.IToolRelease & IGoVersion)[];
manifest = await getManifest(auth);
}
const releases = manifest
.filter(release => !!release.files.find(file => file.arch === arch))
.map(release => release.version);
.map(item => {
const index = item.files.findIndex(item => item.arch === arch);
if (index === -1) {
return '';
}
return item.version;
})
.filter(item => !!item);
if (versionSpec === StableReleaseAlias.Stable) {
core.info(`stable version resolved as ${releases[0]}`);

Loading…
Cancel
Save