-
Notifications
You must be signed in to change notification settings - Fork 17
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
Grab latest version from GitHub Release tag #225
Conversation
"version" | ||
] | ||
|
||
latest_tag = ptex.fetch_json("https://github.com/pantsbuild/pants/releases/latest", Accept="application/json")["tag_name"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The good news is this is a normal public URL, and therefore (I assume) doesn't participate in the anonymous API rate limiting 🎉
I'll bow out. @kaos is a good reviewer for this I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Left a few notes for your consideration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
As discussed in the latest Pants meetup and this proposal, we're going to move off of PyPI for distribution, and instead leverage GitHub Releases.
Some reasons given for this pivot:
pip install pantsbuild.pants
scie-pants
use a PEX in the future, and PyPI wouldn't support that workflowCurrently the latest version is expected to be set by hand. Although that's unlikely to be wrong, we're also changing to have the "latest" marker be automated. Therefore we should be able to rely on it with confidence.
Tested and both before/after yielded the same string (with the GitHub URL performing slightly faster)