Modify github regex to support NCO. (#2633)

This commit is contained in:
Todd Gamblin 2016-12-19 14:17:18 -08:00 committed by GitHub
parent 46436a0909
commit 4b7b6768e6
2 changed files with 10 additions and 1 deletions

View File

@ -331,3 +331,12 @@ def test_r_xml_version(self):
self.check( self.check(
'xml', '3.98-1.4', 'xml', '3.98-1.4',
'https://cran.r-project.org/src/contrib/XML_3.98-1.4.tar.gz') 'https://cran.r-project.org/src/contrib/XML_3.98-1.4.tar.gz')
def test_nco_version(self):
self.check(
'nco', '4.6.2-beta03',
'https://github.com/nco/nco/archive/4.6.2-beta03.tar.gz')
self.check(
'nco', '4.6.3-alpha04',
'https://github.com/nco/nco/archive/4.6.3-alpha04.tar.gz')

View File

@ -189,7 +189,7 @@ def parse_version_offset(path, debug=False):
(r'github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$', path), (r'github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$', path),
# e.g. https://github.com/hpc/lwgrp/archive/v1.0.1.tar.gz # e.g. https://github.com/hpc/lwgrp/archive/v1.0.1.tar.gz
(r'github.com/[^/]+/[^/]+/archive/v?(\d+(?:\.\d+)*)$', path), (r'github.com/[^/]+/[^/]+/archive/v?(\w+(?:[.-]\w+)*)$', path),
# e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style) # e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)
(r'[-_](R\d+[AB]\d*(-\d+)?)', path), (r'[-_](R\d+[AB]\d*(-\d+)?)', path),