aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/version.rb
diff options
context:
space:
mode:
authorMike McQuaid2012-08-25 10:20:48 -0700
committerMike McQuaid2012-08-25 10:21:48 -0700
commit580180bffeb2f1d7c8e0f397710ea9785797027a (patch)
treec1648a924fcd115e84a4d00e72d3024ae59032cd /Library/Homebrew/version.rb
parentc7770efdc759da456d89502aa3c0414260766a99 (diff)
downloadhomebrew-580180bffeb2f1d7c8e0f397710ea9785797027a.tar.bz2
erlang: fix version detection and bottles.
Diffstat (limited to 'Library/Homebrew/version.rb')
-rw-r--r--Library/Homebrew/version.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb
index 796538cfd..9e2fd32ae 100644
--- a/Library/Homebrew/version.rb
+++ b/Library/Homebrew/version.rb
@@ -127,6 +127,10 @@ class Version
m = %r[github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$].match(spec.to_s)
return m.captures.first unless m.nil?
+ # e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)
+ m = /[-_](R\d+[AB]\d*)/.match(spec.to_s)
+ return m.captures.first unless m.nil?
+
# e.g. boost_1_39_0
m = /((\d+_)+\d+)$/.match(stem)
return m.captures.first.gsub('_', '.') unless m.nil?
@@ -164,14 +168,10 @@ class Version
m = /_((\d+\.)+\d+[abc]?)[.]orig$/.match(stem)
return m.captures.first unless m.nil?
- # e.g. erlang-R14B03-bottle.tar.gz (old erlang bottle style)
+ # e.g. http://www.openssl.org/source/openssl-0.9.8s.tar.gz
m = /-([^-]+)/.match(stem)
return m.captures.first unless m.nil?
- # e.g. opt_src_R13B (erlang)
- m = /otp_src_(.+)/.match(stem)
- return m.captures.first unless m.nil?
-
# e.g. astyle_1.23_macosx.tar.gz
m = /_([^_]+)/.match(stem)
return m.captures.first unless m.nil?