aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorTim D. Smith2014-11-02 18:23:09 -0800
committerTim D. Smith2014-11-05 19:11:25 -0800
commit718ebeabf1f0cd0ad917877acccb2ff7c7267170 (patch)
treed5a5c2bc18e1b0691f99f956344eeec9fedf254b /Library/Homebrew
parent6f42d6aeb0b7b43d94aec5ceb7b7dc6224293c5e (diff)
downloadhomebrew-718ebeabf1f0cd0ad917877acccb2ff7c7267170.tar.bz2
BottleVersion: add imap-uw style versions
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/bottle_version.rb4
-rw-r--r--Library/Homebrew/test/test_bottle_versions.rb5
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/bottle_version.rb b/Library/Homebrew/bottle_version.rb
index c05ab8a83..120eac636 100644
--- a/Library/Homebrew/bottle_version.rb
+++ b/Library/Homebrew/bottle_version.rb
@@ -37,6 +37,10 @@ class BottleVersion < Version
m = /-(\d{8})/.match(stem)
return m.captures.first unless m.nil?
+ # e.g. 2007f from imap-uw-2007f.yosemite.bottle.tar.gz
+ m = /-(\d+[a-z])/.match(stem)
+ return m.captures.first unless m.nil?
+
super
end
end
diff --git a/Library/Homebrew/test/test_bottle_versions.rb b/Library/Homebrew/test/test_bottle_versions.rb
index 20eff1246..08333020d 100644
--- a/Library/Homebrew/test/test_bottle_versions.rb
+++ b/Library/Homebrew/test/test_bottle_versions.rb
@@ -60,4 +60,9 @@ class BottleVersionParsingTests < Homebrew::TestCase
assert_version_detected '13-2.9.19',
'libpano-13-2.9.19_1.yosemite.bottle.tar.gz'
end
+
+ def test_imapuw_style
+ assert_version_detected '2007f',
+ 'imap-uw-2007f.yosemite.bottle.tar.gz'
+ end
end