diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index b6b9875585..14ab1e31de 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2139,6 +2139,13 @@ class Formula hsh["bottle"]["stable"] = bottle_hash if bottle_defined? end + if head + hsh["urls"]["head"] = { + "url" => head.url, + "branch" => head.specs[:branch], + } + end + hsh["options"] = options.map do |opt| { "option" => opt.flag, "description" => opt.description } end diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 1578174fba..2d7d103e3c 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -163,6 +163,10 @@ module Formulary end end + if (urls_head = json_formula["urls"]["head"]).present? + head urls_head["url"], branch: urls_head["branch"] + end + if (bottles_stable = json_formula["bottle"]["stable"]).present? bottle do root_url bottles_stable["root_url"]