Fix detecting version from URL
This commit is contained in:
parent
1cccba6a1a
commit
090a52a715
@ -261,7 +261,7 @@ class Version
|
|||||||
# e.g. foobar-4.5.1-1
|
# e.g. foobar-4.5.1-1
|
||||||
# e.g. unrtf_0.20.4-1
|
# e.g. unrtf_0.20.4-1
|
||||||
# e.g. ruby-1.9.1-p243
|
# e.g. ruby-1.9.1-p243
|
||||||
m = /[-_]((?:\d+\.)*\d\.\d+-(?:p|rc|RC)?\d+)(?:[-._](?:bin|dist|stable|src|sources))?$/.match(stem)
|
m = /[-_]((?:\d+\.)*\d+\.\d+-(?:p|rc|RC)?\d+)(?:[-._](?:bin|dist|stable|src|sources))?$/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# URL with no extension
|
# URL with no extension
|
||||||
@ -271,7 +271,7 @@ class Version
|
|||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# e.g. lame-398-1
|
# e.g. lame-398-1
|
||||||
m = /-((?:\d)+-\d+)/.match(stem)
|
m = /-(\d+-\d+)/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# e.g. foobar-4.5.1
|
# e.g. foobar-4.5.1
|
||||||
@ -350,7 +350,7 @@ class Version
|
|||||||
# e.g. https://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_1.9/E.tgz
|
# 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://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
|
# e.g. https://people.gnome.org/~newren/eg/download/1.7.5.2/eg
|
||||||
m = %r{/([rvV]_?)?(\d\.\d+(\.\d+){,2})}.match(spec_s)
|
m = %r{/([rvV]_?)?(\d+\.\d+(\.\d+){,2})}.match(spec_s)
|
||||||
return m.captures.second unless m.nil?
|
return m.captures.second unless m.nil?
|
||||||
|
|
||||||
# e.g. https://www.ijg.org/files/jpegsrc.v8d.tar.gz
|
# e.g. https://www.ijg.org/files/jpegsrc.v8d.tar.gz
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user