bottle_version: support openssl style
This commit is contained in:
parent
61a711f802
commit
2f757ee5aa
@ -7,6 +7,10 @@ class BottleVersion < Version
|
|||||||
m = /[a-z]{3}\d-(\d{1}-\d{8})/.match(stem)
|
m = /[a-z]{3}\d-(\d{1}-\d{8})/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
|
# e.g. 1.0.2a-1 from openssl-1.0.2a-1.yosemite.bottle.1.tar.gz
|
||||||
|
m = /-(\d+\.\d+(\.\d+)+[a-z]-\d+)/.match(stem)
|
||||||
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# e.g. perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz
|
# e.g. perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz
|
||||||
m = /-([\d\.]+-x86(_64)?)/.match(stem)
|
m = /-([\d\.]+-x86(_64)?)/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|||||||
@ -80,4 +80,9 @@ class BottleVersionParsingTests < Homebrew::TestCase
|
|||||||
assert_version_detected '5-20150215',
|
assert_version_detected '5-20150215',
|
||||||
'gcc5-5-20150215.yosemite.bottle.tar.gz'
|
'gcc5-5-20150215.yosemite.bottle.tar.gz'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_openssl_style
|
||||||
|
assert_version_detected '1.0.2a-1',
|
||||||
|
'openssl-1.0.2a-1.yosemite.bottle.1.tar.gz'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user