From d8e06a7e0829c84aa7c773252030b73132df8500 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Fri, 14 Feb 2014 19:45:00 +0100 Subject: Aliases: Adjust GITHUB-TAGS regex - github tags might start with a character that does not belong to the version - Add testcase --- cnucnu/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cnucnu/__init__.py') diff --git a/cnucnu/__init__.py b/cnucnu/__init__.py index 8c67f94..e96cfdc 100644 --- a/cnucnu/__init__.py +++ b/cnucnu/__init__.py @@ -55,7 +55,10 @@ ALIASES = { }, "GITHUB-TAGS": { "url": "https://api.github.com/repos/{name}/tags", - "regex": '"name":\s*"([\d\.]+)"', + # Match strings like: + # "name": "v0.3.0" + # "name": "1.2.3" + "regex": '"name":\s*"[^\d]*([\d\.]+)"', }, "GNU-DEFAULT": { "url": "http://ftp.gnu.org/gnu/{name}/" -- cgit