mirror of https://github.com/actions/setup-python
Merge 05b0430d2d
into 0b93645e9f
This commit is contained in:
commit
a7a4bcf4a5
|
@ -26,6 +26,10 @@ inputs:
|
||||||
allow-prereleases:
|
allow-prereleases:
|
||||||
description: "When 'true', a version range passed to 'python-version' input will match prerelease versions if no GA versions are found. Only 'x.y' version range is supported for CPython."
|
description: "When 'true', a version range passed to 'python-version' input will match prerelease versions if no GA versions are found. Only 'x.y' version range is supported for CPython."
|
||||||
default: false
|
default: false
|
||||||
|
ignore-platform-version:
|
||||||
|
description: "Ignore the specific platform version to allow usage on Debian"
|
||||||
|
default: ""
|
||||||
|
required: false
|
||||||
outputs:
|
outputs:
|
||||||
python-version:
|
python-version:
|
||||||
description: "The installed Python or PyPy version. Useful when given a version range as input."
|
description: "The installed Python or PyPy version. Useful when given a version range as input."
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -34,7 +34,23 @@ export async function findReleaseFromManifest(
|
||||||
|
|
||||||
export async function getManifest(): Promise<tc.IToolRelease[]> {
|
export async function getManifest(): Promise<tc.IToolRelease[]> {
|
||||||
try {
|
try {
|
||||||
return await getManifestFromRepo();
|
const manifest = await getManifestFromRepo();
|
||||||
|
|
||||||
|
if (core.getInput('ignore-platform-version')) {
|
||||||
|
// Display each tool
|
||||||
|
manifest.forEach(tool => {
|
||||||
|
tool.files.forEach(f => {
|
||||||
|
if (
|
||||||
|
f.platform_version === core.getInput('ignore-platform-version') ||
|
||||||
|
'all' === core.getInput('ignore-platform-version')
|
||||||
|
) {
|
||||||
|
f.platform_version = undefined;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return manifest;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.debug('Fetching the manifest via the API failed.');
|
core.debug('Fetching the manifest via the API failed.');
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
|
|
Loading…
Reference in New Issue