From 3bb3dc87acf81b67765f87e7ad6a5b4a2c7b5912 Mon Sep 17 00:00:00 2001 From: Ric Evans Date: Thu, 25 Jan 2024 15:49:36 -0600 Subject: [PATCH] pt3 --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index aae8c1b..5544af3 100644 --- a/action.yml +++ b/action.yml @@ -139,11 +139,11 @@ runs: export ACTION_REPOSITORY="WIPACrepo/wipac-dev-py-setup-action" # get python3 version (max) - SEMVAR_RANGE=$(grep "python_requires =" -h setup.cfg | awk -F 'python_requires =' '{print $2}') + export SEMVAR_RANGE=$(grep "python_requires =" -h setup.cfg | awk -F 'python_requires =' '{print $2}') pip3 install semantic-version export PACKAGE_MAX_PYTHON_VERSION=$(python -c ' - import semantic_version - spec = semantic_version.SimpleSpec("$SEMVAR_RANGE".replace(" ","")) + import semantic_version, os + spec = semantic_version.SimpleSpec(os.getenv("SEMVAR_RANGE").replace(" ","")) maxo = max(spec.filter(semantic_version.Version(f"3.{i}.0") for i in range(99))) print(f"{maxo.major}.{maxo.minor}") ')