Skip to content

Commit

Permalink
Merge pull request #566 from PacificGilly/jamesgilmore/hotfix-versioner
Browse files Browse the repository at this point in the history
Fix the sorting of `LATEST_RELEASE` to get the top result
  • Loading branch information
farridav committed Apr 22, 2024
2 parents 19cbb0e + 2e38a83 commit 338e90f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# then reverse sort them to get highest version! Simples :D
LATEST_RELEASE_TEST_PYPI=$(curl -s https://test.pypi.org/rss/project/django-jazzmin/releases.xml | sed -n 's/\s*<title>\([{a,b}0-9.]*\).*/\1/p' | head -n 2 | xargs)
LATEST_RELEASE_GITHUB=$(curl -s "https://api.github.com/repos/farridav/django-jazzmin/tags" | jq -r '.[0].name[1:]')
LATEST_RELEASE=$(printf "${LATEST_RELEASE_GITHUB}\n${LATEST_RELEASE_TEST_PYPI}" | sort -V -r)
LATEST_RELEASE=$(printf "${LATEST_RELEASE_GITHUB}\n${LATEST_RELEASE_TEST_PYPI}" | sort -V -r | head -n 1)
# Now we can bump the version correctly to release a new version nicely base on the
# latest GH release.
Expand Down

0 comments on commit 338e90f

Please sign in to comment.