Merge pull request #6992 from igas/url-in-json

Add stable url, tag and revision to json output
This commit is contained in:
Mike McQuaid 2020-02-02 17:50:37 +01:00 committed by GitHub
commit a55454dfea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1626,6 +1626,7 @@ class Formula
"head" => head&.version&.to_s, "head" => head&.version&.to_s,
"bottle" => !bottle_specification.checksums.empty?, "bottle" => !bottle_specification.checksums.empty?,
}, },
"urls" => {},
"revision" => revision, "revision" => revision,
"version_scheme" => version_scheme, "version_scheme" => version_scheme,
"bottle" => {}, "bottle" => {},
@ -1677,6 +1678,11 @@ class Formula
} }
end end
hsh["bottle"][spec_sym] = bottle_info hsh["bottle"][spec_sym] = bottle_info
hsh["urls"][spec_sym] = {
"url" => spec.url,
"tag" => spec.specs[:tag],
"revision" => spec.specs[:revision],
}
end end
hsh["options"] = options.map do |opt| hsh["options"] = options.map do |opt|