fix: version resolution when only version file is present
Signed-off-by: Frost Ming <me@frostming.com>
This commit is contained in:
parent
1a0fea8b8e
commit
d4d1a77594
@ -5,8 +5,6 @@ author: Frost Ming
|
||||
inputs:
|
||||
python-version:
|
||||
description: 'Version range or exact version of a Python version to use, using SemVer''s version range syntax.'
|
||||
default: 3.x
|
||||
required: false
|
||||
python-version-file:
|
||||
description: 'File containing the Python version to use. Example: .python-version'
|
||||
architecture:
|
||||
|
2
dist/setup-pdm.js
vendored
2
dist/setup-pdm.js
vendored
@ -91003,7 +91003,7 @@ function isCacheAvailable() {
|
||||
}
|
||||
function resolveVersionInputFromDefaultFile() {
|
||||
const couples = [
|
||||
[".python-version", getVersionInputFromPlainFile]
|
||||
["pyproject.toml", getVersionInputFromTomlFile]
|
||||
];
|
||||
for (const [versionFile, _fn] of couples) {
|
||||
logWarning(
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-pdm",
|
||||
"version": "2.0.0",
|
||||
"version": "4.0.0",
|
||||
"packageManager": "pnpm@8.14.3",
|
||||
"description": "The GitHub Action for using pdm as the package manager",
|
||||
"repository": {
|
||||
|
@ -7,7 +7,7 @@ import { useCpythonVersion } from 'setup-python/src/find-python'
|
||||
import { findPyPyVersion } from 'setup-python/src/find-pypy'
|
||||
import {
|
||||
getVersionInputFromFile,
|
||||
getVersionInputFromPlainFile,
|
||||
getVersionInputFromTomlFile,
|
||||
logWarning,
|
||||
} from 'setup-python/src/utils'
|
||||
import { getExecOutput } from '@actions/exec'
|
||||
@ -80,7 +80,7 @@ export function isCacheAvailable(): boolean {
|
||||
|
||||
function resolveVersionInputFromDefaultFile(): string[] {
|
||||
const couples: [string, (versionFile: string) => string[]][] = [
|
||||
['.python-version', getVersionInputFromPlainFile],
|
||||
['pyproject.toml', getVersionInputFromTomlFile],
|
||||
]
|
||||
for (const [versionFile, _fn] of couples) {
|
||||
logWarning(
|
||||
|
Loading…
x
Reference in New Issue
Block a user