bottle_version: support lz4 style.
This commit is contained in:
parent
6060ffd5ce
commit
f115260a29
@ -8,7 +8,8 @@ class BottleVersion < Version
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
# e.g. x264-r2197.4.mavericks.bottle.tar.gz
|
||||
m = /(r\d+\.\d)/.match(stem)
|
||||
# e.g. lz4-r114.mavericks.bottle.tar.gz
|
||||
m = /(r\d+\.?\d*)/.match(stem)
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
# e.g. ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz
|
||||
|
||||
@ -25,4 +25,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
|
||||
assert_version_detected 'r2197.4',
|
||||
'/usr/local/x264-r2197.4.mavericks.bottle.tar.gz'
|
||||
end
|
||||
|
||||
def test_lz4_style
|
||||
assert_version_detected 'r114',
|
||||
'/usr/local/lz4-r114.mavericks.bottle.tar.gz'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user