aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/version.rb
diff options
context:
space:
mode:
authorJCount2017-06-30 11:37:28 -0400
committerGitHub2017-06-30 11:37:28 -0400
commit0a5052141d59ece4adb3c9dbd62096c7a2ed7282 (patch)
tree3ef27d0e5c6f2cf23457c908ba72c56d3c33aaae /Library/Homebrew/version.rb
parentbfe4eed034487b2cc353e8f7b0107fbb00c974d7 (diff)
parentd50312ae6bb36e8735ae7cbf05eec5498dba32e2 (diff)
downloadbrew-0a5052141d59ece4adb3c9dbd62096c7a2ed7282.tar.bz2
Merge pull request #2827 from JCount/version-improve-url-only-version-parsing
version: improve url-only version parsing
Diffstat (limited to 'Library/Homebrew/version.rb')
-rw-r--r--Library/Homebrew/version.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb
index 8a86126eb..ddeaa6fee 100644
--- a/Library/Homebrew/version.rb
+++ b/Library/Homebrew/version.rb
@@ -428,8 +428,13 @@ class Version
# e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war
# e.g. https://github.com/foo/bar/releases/download/0.10.11/bar.phar
- m = %r{/(\d\.\d+(\.\d+)?)}.match(spec_s)
- return m.captures.first unless m.nil?
+ # e.g. https://github.com/clojure/clojurescript/releases/download/r1.9.293/cljs.jar
+ # e.g. https://github.com/fibjs/fibjs/releases/download/v0.6.1/fullsrc.zip
+ # e.g. https://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_1.9/E.tgz
+ # e.g. https://github.com/JustArchi/ArchiSteamFarm/releases/download/2.3.2.0/ASF.zip
+ # e.g. https://people.gnome.org/~newren/eg/download/1.7.5.2/eg
+ m = %r{/([rvV]_?)?(\d\.\d+(\.\d+){,2})}.match(spec_s)
+ return m.captures[1] unless m.nil?
# e.g. http://www.ijg.org/files/jpegsrc.v8d.tar.gz
m = /\.v(\d+[a-z]?)/.match(stem)