aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-07-04 11:23:09 +0100
committerMike McQuaid2013-07-18 09:56:55 -0700
commitf3821364a724856c7cb6e05246b13434934b50dd (patch)
tree68e9ce03358f7d50ff0c4fa7d836fef0bcfbda44 /Library
parent4f2725cde35e0a9f528a8aedd265c6ff85c8e067 (diff)
downloadbrew-f3821364a724856c7cb6e05246b13434934b50dd.tar.bz2
Warn more about failing bottle version detection.
This is needed for local bottle installation and also possible when detecting bottle versions from URLs.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb3
-rw-r--r--Library/Homebrew/cmd/bottle.rb5
2 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 46197298b..e0d2a8d00 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -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/
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 611a4b57e..569bc03ed 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -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