stop supporting 0_5_0 style bottle version
The original formula (disco) has been moved to use 0.5.0 style version string. So actually no one is using such style. Stop supporting such style, so it wouldn't be ambiguous with revision part in `Formula#pkg_version`. Closes Homebrew/homebrew#38750. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
47aae82d33
commit
61a711f802
@ -40,10 +40,6 @@ class BottleVersion < Version
|
|||||||
m = /-(\d+\.(\d)+(p(\d)+)?)/.match(stem)
|
m = /-(\d+\.(\d)+(p(\d)+)?)/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
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?
|
|
||||||
|
|
||||||
# e.g. 20120731 from fontforge-20120731.mavericks.bottle.tar.gz
|
# e.g. 20120731 from fontforge-20120731.mavericks.bottle.tar.gz
|
||||||
m = /-(\d{8})/.match(stem)
|
m = /-(\d{8})/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
@ -36,11 +36,6 @@ class BottleVersionParsingTests < Homebrew::TestCase
|
|||||||
'/usr/local/pazpar2-1.6.39.mavericks.bottle.tar.gz'
|
'/usr/local/pazpar2-1.6.39.mavericks.bottle.tar.gz'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_disco_style
|
|
||||||
assert_version_detected '0_5_0',
|
|
||||||
'/usr/local/disco-0_5_0.mavericks.bottle.tar.gz'
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_zpython_style
|
def test_zpython_style
|
||||||
assert_version_detected '00-5.0.5',
|
assert_version_detected '00-5.0.5',
|
||||||
'/usr/local/zpython-00-5.0.5.mavericks.bottle.tar.gz'
|
'/usr/local/zpython-00-5.0.5.mavericks.bottle.tar.gz'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user