-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
formula_creator: detect GitHub version from latest release #20025
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
formula_creator: detect GitHub version from latest release #20025
Conversation
b363843
to
0dff1e9
Compare
0dff1e9
to
ad976c4
Compare
25f480e
to
825afde
Compare
f4ae3e5
to
518e29e
Compare
f01a1ed
to
94473af
Compare
@abitrolly This needs rebased. Shout after that and I'll rereview. |
9f6f9ff
to
86c36cd
Compare
@MikeMcQuaid SHOUTING! |
83b412e
to
2cd7a32
Compare
@abitrolly Reviewed and improved code style. Please check it still works for you as expected and then I'll merge. |
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.
@MikeMcQuaid no, it doesn't work. Test don't fail, but version is not detected on real command.
$ brew create https://github.com/buildpacks/pack -d
==> version from url:
==> github: buildpacks pack head:false
==> name from github: pack
...
==> github: version from latest_release:
Formula name [pack]: ^C
Please fix/add the tests so they reproduce this failure. |
@MikeMcQuaid it appears it was only debug message that was incorrect. Fixed that and added test for Now it works as expected. |
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.
Thanks!
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?For GitHut URLs, if
--set-version
is absent, and version is not detected from URL, then PR fetches the version from the data on latest release.Basically, you now can run
brew create
with plain project URL and have the version filled automatically from the latest available.So the data is collected from the two API calls:
$ curl -s https://api.github.com/repos/Homebrew/brew/releases/latest | jq