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:
Xu Cheng 2015-04-17 21:36:13 +08:00
parent 47aae82d33
commit 61a711f802
2 changed files with 0 additions and 9 deletions

View File

@ -40,10 +40,6 @@ 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?
# e.g. 20120731 from fontforge-20120731.mavericks.bottle.tar.gz
m = /-(\d{8})/.match(stem)
return m.captures.first unless m.nil?

View File

@ -36,11 +36,6 @@ class BottleVersionParsingTests < Homebrew::TestCase
'/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
def test_zpython_style
assert_version_detected '00-5.0.5',
'/usr/local/zpython-00-5.0.5.mavericks.bottle.tar.gz'