Warn more about failing bottle version detection.

This is needed for local bottle installation and also possible when
detecting bottle versions from URLs.
This commit is contained in:
Mike McQuaid 2013-07-04 11:23:09 +01:00
parent 4f2725cde3
commit f3821364a7
2 changed files with 8 additions and 0 deletions

View File

@ -281,6 +281,9 @@ class FormulaAuditor
if version_url.to_s == version_text.to_s && s.version.instance_of?(Version)
problem "#{spec} version #{version_text} is redundant with version scanned from URL"
end
if bottle_filename_formula_name(bottle_filename(f)).empty?
problem "Add a new version regex to version.rb to parse the bottle filename."
end
end
if s.version.to_s =~ /^v/

View File

@ -51,6 +51,11 @@ module Homebrew extend self
bottle_revision = bottle_new_revision f
filename = bottle_filename f, bottle_revision
if bottle_filename_formula_name(filename).empty?
return ofail "Add a new version regex to version.rb to parse the bottle filename."
end
bottle_path = Pathname.pwd/filename
sha1 = nil