Skip to content
Snippets Groups Projects
Commit 2f757ee5 authored by Xu Cheng's avatar Xu Cheng
Browse files

bottle_version: support openssl style

parent 61a711f8
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,10 @@ class BottleVersion < Version
m = /[a-z]{3}\d-(\d{1}-\d{8})/.match(stem)
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
m = /-([\d\.]+-x86(_64)?)/.match(stem)
return m.captures.first unless m.nil?
......
......@@ -80,4 +80,9 @@ class BottleVersionParsingTests < Homebrew::TestCase
assert_version_detected '5-20150215',
'gcc5-5-20150215.yosemite.bottle.tar.gz'
end
def test_openssl_style
assert_version_detected '1.0.2a-1',
'openssl-1.0.2a-1.yosemite.bottle.1.tar.gz'
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment