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
api: add using:
attribute to head & stable URLs
#16102
Conversation
Will need adding here too: brew/Library/Homebrew/formulary.rb Line 244 in 0932f36
plus the equivalent a few lines down for head |
0932f36
to
b9214c3
Compare
Library/Homebrew/formula.rb
Outdated
@@ -2281,6 +2281,7 @@ def to_hash | |||
"url" => stable_spec.url, | |||
"tag" => stable_spec.specs[:tag], | |||
"revision" => stable_spec.specs[:revision], | |||
"using" => stable_spec.using, |
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.
using
can be a Class
and we're probably not going to ever support that, nor do we need to for Homebrew/core.
"using" => stable_spec.using, | |
"using" => (stable_spec.using if stable_spec.using.is_a?(Symbol)), |
(+ same change to head)
Library/Homebrew/formulary.rb
Outdated
url_spec = { | ||
tag: urls_stable["tag"], | ||
revision: urls_stable["revision"], | ||
using: urls_stable["using"], |
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.
using: urls_stable["using"], | |
using: urls_stable["using"]&.to_sym, |
(+ same change to head)
b9214c3
to
03e743a
Compare
Thanks @EricFromCanada! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Some formulae rely on the
using:
attribute to indicate how a resource is to be downloaded if it can't be detected via the domain name or protocol, e.g.:using: :homebrew_curl
as it's hosted on a TLS-1.3-only serverusing: :nounzip
to allow for manual hard-link-preserving decompressionusing
attribute to indicate the VCS needed to fetch their sourcesThis change allows from-source installations of these and similar formulae to work when using the API.
Current output:
Future: