From efd8a2d387b31e2d684fbd4a50c6b44a131f1715 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Sat, 30 Nov 2024 06:39:46 +0530 Subject: [PATCH 1/2] Sort the releases before saving to a variable --- scripts/ci/build_matrix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/build_matrix.sh b/scripts/ci/build_matrix.sh index 491bb59df..f61c5b313 100755 --- a/scripts/ci/build_matrix.sh +++ b/scripts/ci/build_matrix.sh @@ -12,7 +12,7 @@ python_version=("3.9" "3.10" "3.11" "3.12") os=("ubuntu-latest" "windows-latest" "macos-13" "macos-14") # This command fetches the last PyBaMM version excluding release candidates from PyPI -pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | grep -v rc | tail -n 1 | paste -sd " " -)) +pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | grep -v rc | sort -V | tail -n 1 | paste -sd " " -)) # This command fetches the last PyBaMM versions including release candidates from PyPI #pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | tail -n 1 | paste -sd " " -)) From 2e9f5b80a2a4653d119c8031a3a6ebadd8d35064 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Sat, 30 Nov 2024 06:49:37 +0530 Subject: [PATCH 2/2] Update rc command as well --- scripts/ci/build_matrix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/build_matrix.sh b/scripts/ci/build_matrix.sh index f61c5b313..0acdb51a2 100755 --- a/scripts/ci/build_matrix.sh +++ b/scripts/ci/build_matrix.sh @@ -15,7 +15,7 @@ os=("ubuntu-latest" "windows-latest" "macos-13" "macos-14") pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | grep -v rc | sort -V | tail -n 1 | paste -sd " " -)) # This command fetches the last PyBaMM versions including release candidates from PyPI -#pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | tail -n 1 | paste -sd " " -)) +#pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | sort -V | tail -n 1 | paste -sd " " -)) # open dict json='{