version: replace [-.vV] with [.-vV] in regexes

This commit is contained in:
Seeker 2021-01-26 17:39:25 -08:00
parent fc7c243471
commit a52959d5d2

View File

@ -458,7 +458,7 @@ class Version
# e.g. https://github.com/dlang/dmd/archive/v2.074.0-beta1.tar.gz # e.g. https://github.com/dlang/dmd/archive/v2.074.0-beta1.tar.gz
# e.g. https://github.com/dlang/dmd/archive/v2.074.0-rc1.tar.gz # e.g. https://github.com/dlang/dmd/archive/v2.074.0-rc1.tar.gz
# e.g. https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-src.zip # e.g. https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-src.zip
StemParser.new(/[-.vV]?(#{DOT_REQUIRED}#{ALPHA_SUFFIX})/), StemParser.new(/[.-vV]?(#{DOT_REQUIRED}#{ALPHA_SUFFIX})/),
# e.g. foobar4.5.1 # e.g. foobar4.5.1
StemParser.new(/(#{DOT_OPTIONAL})$/), StemParser.new(/(#{DOT_OPTIONAL})$/),
@ -496,7 +496,7 @@ class Version
StemParser.new(/\.v(\d+[a-z]?)/), StemParser.new(/\.v(\d+[a-z]?)/),
# e.g. https://secure.php.net/get/php-7.1.10.tar.bz2/from/this/mirror # e.g. https://secure.php.net/get/php-7.1.10.tar.bz2/from/this/mirror
UrlParser.new(/[-.vV]?(#{DOT_REQUIRED}#{ALPHA_SUFFIX}?)/), UrlParser.new(/[.-vV]?(#{DOT_REQUIRED}#{ALPHA_SUFFIX}?)/),
].freeze ].freeze
private_constant :VERSION_PARSERS private_constant :VERSION_PARSERS