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

Add stable url, tag and revision to json output #6992

Merged
merged 2 commits into from Feb 2, 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
6 changes: 6 additions & 0 deletions Library/Homebrew/formula.rb
Expand Up @@ -1626,6 +1626,7 @@ def to_hash
"head" => head&.version&.to_s,
"bottle" => !bottle_specification.checksums.empty?,
},
"urls" => {},
"revision" => revision,
"version_scheme" => version_scheme,
"bottle" => {},
Expand Down Expand Up @@ -1677,6 +1678,11 @@ 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