Merge pull request #16102 from EricFromCanada/api-urls-using
api: add `using:` attribute to head & stable URLs
This commit is contained in:
commit
eacf8d96d6
@ -2281,6 +2281,7 @@ class Formula
|
|||||||
"url" => stable_spec.url,
|
"url" => stable_spec.url,
|
||||||
"tag" => stable_spec.specs[:tag],
|
"tag" => stable_spec.specs[:tag],
|
||||||
"revision" => stable_spec.specs[:revision],
|
"revision" => stable_spec.specs[:revision],
|
||||||
|
"using" => (stable_spec.using if stable_spec.using.is_a?(Symbol)),
|
||||||
"checksum" => stable_spec.checksum&.to_s,
|
"checksum" => stable_spec.checksum&.to_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2291,6 +2292,7 @@ class Formula
|
|||||||
hsh["urls"]["head"] = {
|
hsh["urls"]["head"] = {
|
||||||
"url" => T.must(head).url,
|
"url" => T.must(head).url,
|
||||||
"branch" => T.must(head).specs[:branch],
|
"branch" => T.must(head).specs[:branch],
|
||||||
|
"using" => (T.must(head).using if T.must(head).using.is_a?(Symbol)),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -241,7 +241,11 @@ module Formulary
|
|||||||
|
|
||||||
if (urls_stable = json_formula["urls"]["stable"].presence)
|
if (urls_stable = json_formula["urls"]["stable"].presence)
|
||||||
stable do
|
stable do
|
||||||
url_spec = { tag: urls_stable["tag"], revision: urls_stable["revision"] }.compact
|
url_spec = {
|
||||||
|
tag: urls_stable["tag"],
|
||||||
|
revision: urls_stable["revision"],
|
||||||
|
using: urls_stable["using"]&.to_sym,
|
||||||
|
}.compact
|
||||||
url urls_stable["url"], **url_spec
|
url urls_stable["url"], **url_spec
|
||||||
version json_formula["versions"]["stable"]
|
version json_formula["versions"]["stable"]
|
||||||
sha256 urls_stable["checksum"] if urls_stable["checksum"].present?
|
sha256 urls_stable["checksum"] if urls_stable["checksum"].present?
|
||||||
@ -256,7 +260,10 @@ module Formulary
|
|||||||
|
|
||||||
if (urls_head = json_formula["urls"]["head"].presence)
|
if (urls_head = json_formula["urls"]["head"].presence)
|
||||||
head do
|
head do
|
||||||
url_spec = { branch: urls_head["branch"] }.compact
|
url_spec = {
|
||||||
|
branch: urls_head["branch"],
|
||||||
|
using: urls_head["using"]&.to_sym,
|
||||||
|
}.compact
|
||||||
url urls_head["url"], **url_spec
|
url urls_head["url"], **url_spec
|
||||||
|
|
||||||
instance_exec(:head, &add_deps)
|
instance_exec(:head, &add_deps)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user