Skip to content
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 JSON: include URLs for non-bottled formulae #7560

Merged
merged 1 commit into from May 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions Library/Homebrew/formula.rb
Expand Up @@ -1716,6 +1716,13 @@ def to_hash

%w[stable devel].each do |spec_sym|
next unless spec = send(spec_sym)

hsh["urls"][spec_sym] = {
"url" => spec.url,
"tag" => spec.specs[:tag],
"revision" => spec.specs[:revision],
}

next unless spec.bottle_defined?

bottle_spec = spec.bottle_specification
Expand All @@ -1735,11 +1742,6 @@ def to_hash
}
end
hsh["bottle"][spec_sym] = bottle_info
hsh["urls"][spec_sym] = {
"url" => spec.url,
"tag" => spec.specs[:tag],
"revision" => spec.specs[:revision],
}
end

hsh["options"] = options.map do |opt|
Expand Down