diff options
| author | Tim D. Smith | 2014-11-02 18:23:09 -0800 |
|---|---|---|
| committer | Tim D. Smith | 2014-11-05 19:11:25 -0800 |
| commit | f5a54ab3495a65324cca353dd387d0755d6c7ba9 (patch) | |
| tree | d975aa86fe1b270ba32eb8dc7244d7dcaa945a40 /Library | |
| parent | 6eabbed464c6a33a5af8d646805fae9fa3f3c648 (diff) | |
| download | brew-f5a54ab3495a65324cca353dd387d0755d6c7ba9.tar.bz2 | |
BottleVersion: add imap-uw style versions
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/bottle_version.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_bottle_versions.rb | 5 |
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 |
