diff options
| author | JCount | 2017-06-26 16:16:45 -0400 |
|---|---|---|
| committer | JCount | 2017-06-30 10:53:24 -0400 |
| commit | f87fadd4ee7a5f157df6813c233b9e8684a66a4b (patch) | |
| tree | ae1506ea42086f7f0a2a2c559db3c7da28732aa4 /Library | |
| parent | 13576111e0d8c335ef9fb5d6c37c4afbe083224a (diff) | |
| download | brew-f87fadd4ee7a5f157df6813c233b9e8684a66a4b.tar.bz2 | |
version: improve parsing of url-only, non-filename versions
add support for styles prefixed with a r,v,V and an optional _ ,
and styles with four groups of digits, seperated by periods;
combinations of the two are also supported
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/version.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb index f99914c4d..5e8ba7a43 100644 --- a/Library/Homebrew/version.rb +++ b/Library/Homebrew/version.rb @@ -407,8 +407,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) |
