diff options
| author | Zhiming Wang | 2016-09-23 04:13:29 -0400 |
|---|---|---|
| committer | Zhiming Wang | 2016-09-23 06:23:36 -0400 |
| commit | 58a2ef9b58d90dd831647f1bcc39e8597be5a7b8 (patch) | |
| tree | 10a66562f63db5d9ad5436b7e70e5f668b57419d /Library/Homebrew | |
| parent | bc52932e5ab83d253850cc622c7a0032e9d2de20 (diff) | |
| download | brew-58a2ef9b58d90dd831647f1bcc39e8597be5a7b8.tar.bz2 | |
version: improve alpha and rc detection
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/version.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb index 520db6626..a9da7967d 100644 --- a/Library/Homebrew/version.rb +++ b/Library/Homebrew/version.rb @@ -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 |
