mirror of https://github.com/actions/setup-python
Merge 6d804ec3f0
into 9c76e71650
This commit is contained in:
commit
cff6940f95
|
@ -53,6 +53,7 @@ function resolveVersionInputFromDefaultFile(): string[] {
|
||||||
function resolveVersionInput() {
|
function resolveVersionInput() {
|
||||||
let versions = core.getMultilineInput('python-version');
|
let versions = core.getMultilineInput('python-version');
|
||||||
const versionFile = core.getInput('python-version-file');
|
const versionFile = core.getInput('python-version-file');
|
||||||
|
const versionStrategy = core.getInput('python-version-strategy');
|
||||||
|
|
||||||
if (versions.length) {
|
if (versions.length) {
|
||||||
if (versionFile) {
|
if (versionFile) {
|
||||||
|
@ -73,6 +74,9 @@ function resolveVersionInput() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(versionStrategy == "approximate")
|
||||||
|
versions.map(v => v.replace(">=", "~").replace("^", "~"));
|
||||||
|
|
||||||
return versions;
|
return versions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue