version: rename ALPHA_SUFFIX to PREREL_SUFFIX

This commit is contained in:
Seeker 2021-01-27 17:12:24 -08:00
parent a52959d5d2
commit 2e6e38ec4d

View File

@ -391,8 +391,8 @@ class Version
BIN_SUFFIX = /(?:[._-](?i:bin|dist|stable|src|sources?|final|full))/.source.freeze BIN_SUFFIX = /(?:[._-](?i:bin|dist|stable|src|sources?|final|full))/.source.freeze
private_constant :BIN_SUFFIX private_constant :BIN_SUFFIX
ALPHA_SUFFIX = /(?:[._-]?(?i:alpha|beta|pre|rc)\.?\d{,2})/.source.freeze PREREL_SUFFIX = /(?:[._-]?(?i:alpha|beta|pre|rc)\.?\d{,2})/.source.freeze
private_constant :ALPHA_SUFFIX private_constant :PREREL_SUFFIX
VERSION_PARSERS = [ VERSION_PARSERS = [
# date-based versioning # date-based versioning
@ -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}#{PREREL_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}#{PREREL_SUFFIX}?)/),
].freeze ].freeze
private_constant :VERSION_PARSERS private_constant :VERSION_PARSERS