api: add using: attribute to head & stable URLs
This commit is contained in:
parent
f89c7194e8
commit
03e743a75e
@ -2281,6 +2281,7 @@ class Formula
|
||||
"url" => stable_spec.url,
|
||||
"tag" => stable_spec.specs[:tag],
|
||||
"revision" => stable_spec.specs[:revision],
|
||||
"using" => (stable_spec.using if stable_spec.using.is_a?(Symbol)),
|
||||
"checksum" => stable_spec.checksum&.to_s,
|
||||
}
|
||||
|
||||
@ -2291,6 +2292,7 @@ class Formula
|
||||
hsh["urls"]["head"] = {
|
||||
"url" => T.must(head).url,
|
||||
"branch" => T.must(head).specs[:branch],
|
||||
"using" => (T.must(head).using if T.must(head).using.is_a?(Symbol)),
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@ -241,7 +241,11 @@ module Formulary
|
||||
|
||||
if (urls_stable = json_formula["urls"]["stable"].presence)
|
||||
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
|
||||
version json_formula["versions"]["stable"]
|
||||
sha256 urls_stable["checksum"] if urls_stable["checksum"].present?
|
||||
@ -256,7 +260,10 @@ module Formulary
|
||||
|
||||
if (urls_head = json_formula["urls"]["head"].presence)
|
||||
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
|
||||
|
||||
instance_exec(:head, &add_deps)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user