mirror of
https://github.com/actions/setup-python.git
synced 2025-07-22 11:08:21 +02:00
add check-latest for pypy
This commit is contained in:
parent
4841389b47
commit
73adf61d1f
8 changed files with 165 additions and 31 deletions
|
@ -19,11 +19,12 @@ import {
|
|||
export async function installPyPy(
|
||||
pypyVersion: string,
|
||||
pythonVersion: string,
|
||||
architecture: string
|
||||
architecture: string,
|
||||
releases: IPyPyManifestRelease[] | undefined
|
||||
) {
|
||||
let downloadDir;
|
||||
|
||||
const releases = await getAvailablePyPyVersions();
|
||||
releases ??= await getAvailablePyPyVersions();
|
||||
if (!releases || releases.length === 0) {
|
||||
throw new Error('No release was found in PyPy version.json');
|
||||
}
|
||||
|
@ -78,7 +79,7 @@ export async function installPyPy(
|
|||
return {installDir, resolvedPythonVersion, resolvedPyPyVersion};
|
||||
}
|
||||
|
||||
async function getAvailablePyPyVersions() {
|
||||
export async function getAvailablePyPyVersions() {
|
||||
const url = 'https://downloads.python.org/pypy/versions.json';
|
||||
const http: httpm.HttpClient = new httpm.HttpClient('tool-cache');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue