Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the sorting of LATEST_RELEASE to get the top result #566

Merged

Conversation

PacificGilly
Copy link
Collaborator

A silly mistake where I sorted the list of the versions, but never extracted the top results!

>>> 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 | head -n 1)
>>> poetry version $LATEST_RELEASE
... Bumping version from 3.0.1a0 to 3.0.0
>>> poetry version prerelease
... Bumping version from 3.0.0 to 3.0.1a0
```

Silly mistake where I sorted the list of the versions, but never
extracted the top results!
@PacificGilly PacificGilly self-assigned this Apr 22, 2024
@farridav farridav merged commit 338e90f into farridav:master Apr 22, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants