Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix log for stable aliases #303

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions dist/setup/index.js
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
});
Expand Down
6 changes: 2 additions & 4 deletions src/installer.ts
Expand Up @@ -60,6 +60,8 @@ export async function getGo(
}
}

core.info(`${versionSpec} version resolved as ${stableVersion}`);

versionSpec = stableVersion;
}

Expand Down Expand Up @@ -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(
Expand All @@ -426,8 +426,6 @@ export async function resolveStableVersionInput(
item.startsWith(uniqueVersions[1])
);

core.info(`oldstable version resolved as ${oldstableVersion}`);

return oldstableVersion;
}
}