tarball: extend github URL match patterns

Extend the regular expressions used to match github URLs. Covers
additional cases found in the wild.

Signed-off-by: Brett T. Warden <brett.t.warden@intel.com>
This commit is contained in:
Brett T. Warden
2017-10-24 14:49:40 -07:00
committed by Matthew Johnson
parent 5132520108
commit 17fa67533f
+2 -1
View File
@@ -332,7 +332,8 @@ def name_and_version(name_arg, version_arg, filemanager):
github_patterns = [r"https?://github.com/(.*)/(.*?)/archive/[v|r]?.*/(.*).tar",
r"https?://github.com/(.*)/(.*?)/archive/[-a-zA-Z]*-(.*).tar",
r"https?://github.com/(.*)/(.*?)/archive/[vVrR]?(.*).tar",
r"https?://github.com/(.*)/(.*?)/releases/download/v.*/(.*).tar"]
r"https?://github.com/(.*)/(.*?)/releases/download/.*?/(.*).tar",
r"https?://github.com/(.*)/(.*?)/files/.*?/(.*).tar"]
for pattern in github_patterns:
m = re.search(pattern, url)