aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-07-10 03:11:05 +0100
committerMax Howell2009-07-10 03:11:05 +0100
commitdbca49c751c4c2e128bd9b931c019ab5d707d921 (patch)
tree9cecd5cb2f9aedf5aabec708441ddb924e4828fd /Library
parent0a35888f45f16a0e18f4690ae70e8d4deac86070 (diff)
downloadhomebrew-dbca49c751c4c2e128bd9b931c019ab5d707d921.tar.bz2
Support gloox version style
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brewkit.rb4
-rwxr-xr-xLibrary/Homebrew/unittest.rb5
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb
index 49f29369c..9a82f8f4f 100644
--- a/Library/Homebrew/brewkit.rb
+++ b/Library/Homebrew/brewkit.rb
@@ -73,6 +73,10 @@ def extract_version basename
/-((\d+\.)*\d+([abc]|rc\d))$/.match basename
return $1 if $1
+ # eg foobar-4.5.0-beta1
+ /-((\d+\.)*\d+-beta\d+)$/.match basename
+ return $1 if $1
+
# eg. foobar4.5.1
/((\d+\.)*\d+)$/.match basename
return $1 if $1
diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb
index f3e24c407..84f0d3f81 100755
--- a/Library/Homebrew/unittest.rb
+++ b/Library/Homebrew/unittest.rb
@@ -47,6 +47,11 @@ class BeerTasting <Test::Unit::TestCase
assert_equal '9.04', r.version
end
+ def test_gloox_beta_style
+ r=TestFormula.new "http://camaya.net/download/gloox-1.0-beta7.tar.bz2"
+ assert_equal '1.0-beta7', r.version
+ end
+
def test_astyle_verson_style
r=TestFormula.new "http://kent.dl.sourceforge.net/sourceforge/astyle/astyle_1.23_macosx.tar.gz"
assert_equal '1.23', r.version