Add revision to brew info --json

Closes Homebrew/homebrew#27820.
This commit is contained in:
Jack Nagel 2014-03-28 20:41:02 -05:00
parent 1c558d49dd
commit 3871165c58

View File

@ -491,6 +491,7 @@ class Formula
"devel" => (devel.version.to_s if devel),
"head" => (head.version.to_s if head)
},
"revision" => revision,
"installed" => [],
"linked_keg" => (linked_keg.realpath.basename.to_s if linked_keg.exist?),
"keg_only" => keg_only?,
@ -512,7 +513,7 @@ class Formula
tab = Tab.for_keg keg
hsh["installed"] << {
"version" => keg.basename.to_s,
"version" => keg.version.to_s,
"used_options" => tab.used_options.map(&:flag),
"built_as_bottle" => tab.built_bottle,
"poured_from_bottle" => tab.poured_from_bottle