aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb4
-rw-r--r--Library/Homebrew/test/test_versions.rb5
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index c0b91c5b9..0986d04f7 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -164,6 +164,10 @@ class Pathname
/_((\d+\.)+\d+[abc]?)[.]orig$/.match stem
return $1 if $1
+ # brew bottle style e.g. qt-4.7.3-bottle.tar.gz
+ /-((\d+\.)*\d+)-bottle$/.match stem
+ return $1 if $1
+
# eg. otp_src_R13B (this is erlang's style)
# eg. astyle_1.23_macosx.tar.gz
stem.scan(/_([^_]+)/) do |match|
diff --git a/Library/Homebrew/test/test_versions.rb b/Library/Homebrew/test/test_versions.rb
index 5e8783232..1febdab0a 100644
--- a/Library/Homebrew/test/test_versions.rb
+++ b/Library/Homebrew/test/test_versions.rb
@@ -159,4 +159,9 @@ class VersionTests < Test::Unit::TestCase
check 'http://ftp.de.debian.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz',
'1.01b'
end
+
+ def test_bottle_style
+ check 'https://downloads.sourceforge.net/project/machomebrew/Bottles/qt-4.7.3-bottle.tar.gz',
+ '4.7.3'
+ end
end