mirror of
https://github.com/actions/setup-go.git
synced 2024-11-27 03:09:56 +08:00
fix log for stable aliases (#303)
This commit is contained in:
parent
38dbe75f81
commit
6edd4406fa
3
dist/setup/index.js
vendored
3
dist/setup/index.js
vendored
@ -63241,6 +63241,7 @@ function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
||||
throw new Error(`Unable to find Go version '${versionSpec}' for platform ${osPlat} and architecture ${arch}.`);
|
||||
}
|
||||
}
|
||||
core.info(`${versionSpec} version resolved as ${stableVersion}`);
|
||||
versionSpec = stableVersion;
|
||||
}
|
||||
if (checkLatest) {
|
||||
@ -63507,14 +63508,12 @@ function resolveStableVersionInput(versionSpec, arch, platform, manifest) {
|
||||
})
|
||||
.filter(item => !!item && !semver.prerelease(item));
|
||||
if (versionSpec === utils_1.StableReleaseAlias.Stable) {
|
||||
core.info(`stable version resolved as ${releases[0]}`);
|
||||
return releases[0];
|
||||
}
|
||||
else {
|
||||
const versions = releases.map(release => `${semver.major(release)}.${semver.minor(release)}`);
|
||||
const uniqueVersions = Array.from(new Set(versions));
|
||||
const oldstableVersion = releases.find(item => item.startsWith(uniqueVersions[1]));
|
||||
core.info(`oldstable version resolved as ${oldstableVersion}`);
|
||||
return oldstableVersion;
|
||||
}
|
||||
});
|
||||
|
@ -60,6 +60,8 @@ export async function getGo(
|
||||
}
|
||||
}
|
||||
|
||||
core.info(`${versionSpec} version resolved as ${stableVersion}`);
|
||||
|
||||
versionSpec = stableVersion;
|
||||
}
|
||||
|
||||
@ -413,8 +415,6 @@ export async function resolveStableVersionInput(
|
||||
.filter(item => !!item && !semver.prerelease(item));
|
||||
|
||||
if (versionSpec === StableReleaseAlias.Stable) {
|
||||
core.info(`stable version resolved as ${releases[0]}`);
|
||||
|
||||
return releases[0];
|
||||
} else {
|
||||
const versions = releases.map(
|
||||
@ -426,8 +426,6 @@ export async function resolveStableVersionInput(
|
||||
item.startsWith(uniqueVersions[1])
|
||||
);
|
||||
|
||||
core.info(`oldstable version resolved as ${oldstableVersion}`);
|
||||
|
||||
return oldstableVersion;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user