fix: allow to pick which version to use by only removing platform_version for this version

This commit is contained in:
Remi Cattiau 2024-08-29 21:56:07 -07:00
parent 427878c2d3
commit 05b0430d2d
No known key found for this signature in database
GPG key ID: 44758D9D44CF1F04
3 changed files with 12 additions and 4 deletions

View file

@ -27,8 +27,8 @@ inputs:
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
ignore-platform-version:
description: "Ignore the platform version to allow usage on Debian"
default: false
description: "Ignore the specific platform version to allow usage on Debian"
default: ""
required: false
outputs:
python-version:

3
dist/setup/index.js vendored
View file

@ -71732,7 +71732,10 @@ function getManifest() {
// 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;
}
});
});
}

View file

@ -40,7 +40,12 @@ export async function getManifest(): Promise<tc.IToolRelease[]> {
// 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;
}
});
});
}