mirror of https://github.com/actions/setup-go.git
minor changes
This commit is contained in:
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* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (!manifest) {
|
if (!manifest) {
|
||||||
core.debug('No manifest cached');
|
core.debug('No manifest cached');
|
||||||
manifest = (yield getManifest(auth));
|
manifest = yield getManifest(auth);
|
||||||
}
|
}
|
||||||
const releases = manifest
|
const releases = manifest
|
||||||
.filter(release => !!release.files.find(file => file.arch === arch))
|
.map(item => {
|
||||||
.map(release => release.version);
|
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) {
|
if (versionSpec === utils_1.StableReleaseAlias.Stable) {
|
||||||
core.info(`stable version resolved as ${releases[0]}`);
|
core.info(`stable version resolved as ${releases[0]}`);
|
||||||
return releases[0];
|
return releases[0];
|
||||||
|
|
|
@ -66,7 +66,7 @@ export async function getGo(
|
||||||
versionSpec,
|
versionSpec,
|
||||||
auth,
|
auth,
|
||||||
arch,
|
arch,
|
||||||
manifest as (tc.IToolRelease & IGoVersion)[]
|
manifest
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ export async function findMatch(
|
||||||
versionSpec,
|
versionSpec,
|
||||||
undefined,
|
undefined,
|
||||||
arch,
|
arch,
|
||||||
fixedCandidates as (tc.IToolRelease & IGoVersion)[]
|
fixedCandidates
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,16 +375,22 @@ export async function resolveStableVersionInput(
|
||||||
versionSpec: string,
|
versionSpec: string,
|
||||||
auth: string | undefined,
|
auth: string | undefined,
|
||||||
arch = os.arch(),
|
arch = os.arch(),
|
||||||
manifest: (tc.IToolRelease & IGoVersion)[] | undefined
|
manifest: tc.IToolRelease[] | IGoVersion[] | undefined
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
if (!manifest) {
|
if (!manifest) {
|
||||||
core.debug('No manifest cached');
|
core.debug('No manifest cached');
|
||||||
manifest = (await getManifest(auth)) as (tc.IToolRelease & IGoVersion)[];
|
manifest = await getManifest(auth);
|
||||||
}
|
}
|
||||||
|
|
||||||
const releases = manifest
|
const releases = manifest
|
||||||
.filter(release => !!release.files.find(file => file.arch === arch))
|
.map(item => {
|
||||||
.map(release => release.version);
|
const index = item.files.findIndex(item => item.arch === arch);
|
||||||
|
if (index === -1) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return item.version;
|
||||||
|
})
|
||||||
|
.filter(item => !!item);
|
||||||
|
|
||||||
if (versionSpec === StableReleaseAlias.Stable) {
|
if (versionSpec === StableReleaseAlias.Stable) {
|
||||||
core.info(`stable version resolved as ${releases[0]}`);
|
core.info(`stable version resolved as ${releases[0]}`);
|
||||||
|
|
Loading…
Reference in New Issue