From f240f0d975a8cd252b569350c0a5527c1c681405 Mon Sep 17 00:00:00 2001 From: silabs-tuD Date: Wed, 25 Dec 2024 10:00:29 +0700 Subject: [PATCH] Fix check-version-pypi in Github Workflow --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1b291d2..a947c7f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -74,7 +74,7 @@ jobs: run: | NEW_VERSION=${{ needs.check-tag-details.outputs.new_version }} LATEST_VERSION=$latest_previous_version - if [ "$(printf '%s\n' "$LATEST_VERSION" "$NEW_VERSION" | sort -rV | head -n 1)" != "$NEW_VERSION" ] || [ "$NEW_VERSION" == "$LATEST_VERSION" ]; then + if [ "$(printf '%s\n' "$LATEST_VERSION" "$NEW_VERSION" | sort -V | head -n 1)" != "$NEW_VERSION" ] || [ "$NEW_VERSION" == "$LATEST_VERSION" ]; then echo "The new version $NEW_VERSION is not greater than the latest version $LATEST_VERSION on PyPI." exit 1 else