Skip to content

Commit

Permalink
Update version fetching logic in release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mpvanderschelling committed Nov 5, 2024
1 parent dce7b78 commit 163f5c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Fetch information from PyPI
run: |
response=$(curl -s https://pypi.org/pypi/${{ env.PACKAGE_NAME }}/json || echo "{}")
latest_previous_version=$(echo $response | grep -oP '"releases":\{"\K[^"]+' | sort -rV | head -n 1)
latest_previous_version=$(echo $response | awk '/"releases":/ {flag=1} flag' | grep -oP '"\d+\.\d+(\.\d+)*"' | tr -d '"' | sort -rV | head -n 1)
if [ -z "$latest_previous_version" ]; then
echo "Package not found on PyPI."
latest_previous_version="0.0.0"
Expand Down

0 comments on commit 163f5c6

Please sign in to comment.