version: improve alpha and rc detection

This commit is contained in:
Zhiming Wang 2016-09-23 04:13:29 -04:00
parent bc52932e5a
commit 58a2ef9b58
No known key found for this signature in database
GPG Key ID: BBD31D4D110044B8

View File

@ -340,8 +340,8 @@ class Version
m = /-((?:\d+\.)*\d+(?:[abc]|rc|RC)\d*)$/.match(stem)
return m.captures.first unless m.nil?
# e.g. foobar-4.5.0-beta1, or foobar-4.50-beta
m = /-((?:\d+\.)*\d+-beta\d*)$/.match(stem)
# e.g. foobar-4.5.0-alpha5, foobar-4.5.0-beta1, or foobar-4.50-beta
m = /-((?:\d+\.)*\d+-(?:alpha|beta|rc)\d*)$/.match(stem)
return m.captures.first unless m.nil?
# e.g. http://ftpmirror.gnu.org/libidn/libidn-1.29-win64.zip