diff options
author | Till Maas <opensource@till.name> | 2014-02-14 19:45:00 +0100 |
---|---|---|
committer | Till Maas <opensource@till.name> | 2014-02-14 19:45:00 +0100 |
commit | d8e06a7e0829c84aa7c773252030b73132df8500 (patch) | |
tree | c657bccaa08c6b8ca1a280afc239f46b2c6365c1 /cnucnu/__init__.py | |
parent | 81aaf9409a83e35550705416425eb4aa6f806e05 (diff) | |
download | cnucnu-d8e06a7e0829c84aa7c773252030b73132df8500.tar.gz cnucnu-d8e06a7e0829c84aa7c773252030b73132df8500.tar.xz cnucnu-d8e06a7e0829c84aa7c773252030b73132df8500.zip |
Aliases: Adjust GITHUB-TAGS regex
- github tags might start with a character that does not belong to the
version
- Add testcase
Diffstat (limited to 'cnucnu/__init__.py')
-rw-r--r-- | cnucnu/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
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}/" |