Add check-latest functionality (#406)

This commit is contained in:
Dmitry Shibanov
2022-07-25 16:54:04 +02:00
committed by GitHub
parent 49a521fa06
commit 2f06e9da25
14 changed files with 440 additions and 82 deletions

View File

@ -80,6 +80,8 @@ async function run() {
);
try {
const version = resolveVersionInput();
const checkLatest = core.getBooleanInput('check-latest');
if (version) {
let pythonVersion: string;
const arch: string = core.getInput('architecture') || os.arch();
@ -88,7 +90,8 @@ async function run() {
const installed = await finderPyPy.findPyPyVersion(
version,
arch,
updateEnvironment
updateEnvironment,
checkLatest
);
pythonVersion = `${installed.resolvedPyPyVersion}-${installed.resolvedPythonVersion}`;
core.info(
@ -98,7 +101,8 @@ async function run() {
const installed = await finder.useCpythonVersion(
version,
arch,
updateEnvironment
updateEnvironment,
checkLatest
);
pythonVersion = installed.version;
core.info(`Successfully set up ${installed.impl} (${pythonVersion})`);