mirror of
https://github.com/actions/setup-python.git
synced 2026-01-20 21:08:54 +08:00
add check-latest for pypy
This commit is contained in:
parent
4841389b47
commit
73adf61d1f
8 changed files with 165 additions and 31 deletions
|
|
@ -32,15 +32,14 @@ function binDir(installDir: string): string {
|
|||
|
||||
export async function useCpythonVersion(
|
||||
version: string,
|
||||
architecture: string
|
||||
architecture: string,
|
||||
checkLatest: boolean
|
||||
): Promise<InstalledVersion> {
|
||||
let manifest: tc.IToolRelease[] | null = null;
|
||||
const desugaredVersionSpec = desugarDevVersion(version);
|
||||
let semanticVersionSpec = pythonVersionToSemantic(desugaredVersionSpec);
|
||||
core.debug(`Semantic version spec of ${version} is ${semanticVersionSpec}`);
|
||||
|
||||
const checkLatest = core.getBooleanInput('check-latest');
|
||||
|
||||
if (checkLatest) {
|
||||
manifest = await installer.getManifest();
|
||||
const resolvedVersion = (await installer.findReleaseFromManifest(semanticVersionSpec, architecture, manifest))?.version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue