bottle_version: parse disco bottle versions.
This commit is contained in:
parent
2fb6d2fdbe
commit
0ac11f8026
@ -21,6 +21,10 @@ class BottleVersion < Version
|
||||
m = /-(\d+\.(\d)+(p(\d)+)?)/.match(stem)
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
# e.g. 0_5_0 from disco-0_5_0.mavericks.bottle.tar.gz
|
||||
m = /-(\d+_\d+(_\d+)+)/.match(stem)
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
@ -35,4 +35,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
|
||||
assert_version_detected '1.6.39',
|
||||
'/usr/local/pazpar2-1.6.39.mavericks.bottle.tar.gz'
|
||||
end
|
||||
|
||||
def test_disco_style
|
||||
assert_version_detected '0_5_0',
|
||||
'/usr/local/disco-0_5_0.mavericks.bottle.tar.gz'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user