mirror of
https://github.com/actions/setup-python.git
synced 2025-06-08 14:37:00 +09:00
Add check-latest functionality (#406)
This commit is contained in:
parent
49a521fa06
commit
2f06e9da25
14 changed files with 440 additions and 82 deletions
|
@ -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})`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue