bottle_version: support apparix-11-062
This commit is contained in:
parent
4836dda1d4
commit
8f8061e5f8
@ -22,7 +22,9 @@ class BottleVersion < Version
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
# e.g. 13-2.9.19 from libpano-13-2.9.19_1.yosemite.bottle.tar.gz
|
||||
m = /\D+-(\d+-[\d\.]+)/.match(stem)
|
||||
# e.g. 11-062 from apparix-11-062.yosemite.bottle.tar.gz
|
||||
# but not 11-062.. from apparix-11-062..bottle.tar.gz
|
||||
m = /\D+-(\d+-\d+(\.\d+)*)/.match(stem)
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
# e.g. 1.6.39 from pazpar2-1.6.39.mavericks.bottle.tar.gz
|
||||
|
||||
@ -75,4 +75,9 @@ class BottleVersionParsingTests < Homebrew::TestCase
|
||||
assert_version_detected '22',
|
||||
'ngircd-22.mavericks.bottle.tar.gz'
|
||||
end
|
||||
|
||||
def test_apparix_style
|
||||
assert_version_detected '11-062',
|
||||
'apparix-11-062.yosemite.bottle.tar.gz'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user