mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
version: rename ALPHA_SUFFIX to PREREL_SUFFIX
This commit is contained in:
parent
a52959d5d2
commit
2e6e38ec4d
@ -391,8 +391,8 @@ class Version
|
||||
BIN_SUFFIX = /(?:[._-](?i:bin|dist|stable|src|sources?|final|full))/.source.freeze
|
||||
private_constant :BIN_SUFFIX
|
||||
|
||||
ALPHA_SUFFIX = /(?:[._-]?(?i:alpha|beta|pre|rc)\.?\d{,2})/.source.freeze
|
||||
private_constant :ALPHA_SUFFIX
|
||||
PREREL_SUFFIX = /(?:[._-]?(?i:alpha|beta|pre|rc)\.?\d{,2})/.source.freeze
|
||||
private_constant :PREREL_SUFFIX
|
||||
|
||||
VERSION_PARSERS = [
|
||||
# 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-rc1.tar.gz
|
||||
# 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
|
||||
StemParser.new(/(#{DOT_OPTIONAL})$/),
|
||||
@ -496,7 +496,7 @@ class Version
|
||||
StemParser.new(/\.v(\d+[a-z]?)/),
|
||||
|
||||
# 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
|
||||
private_constant :VERSION_PARSERS
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user