diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index ca943a27df..6ad5eae3a6 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -18,6 +18,7 @@ class Formula attr_reader :name, :path, :homepage, :build attr_reader :stable, :bottle, :devel, :head, :active_spec + attr_reader :revision # The current working directory during builds and tests. # Will only be non-nil inside #stage and #test. @@ -34,6 +35,7 @@ class Formula @name = name @path = path @homepage = self.class.homepage + @revision = self.class.revision || 0 set_spec :stable set_spec :devel @@ -662,7 +664,7 @@ class Formula class << self attr_reader :keg_only_reason, :cc_failures - attr_rw :homepage, :plist_startup, :plist_manual + attr_rw :homepage, :plist_startup, :plist_manual, :revision def specs @specs ||= [stable, devel, head, bottle].freeze