summaryrefslogtreecommitdiffstats
path: root/cnucnu/__init__.py
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2014-02-14 19:45:00 +0100
committerTill Maas <opensource@till.name>2014-02-14 19:45:00 +0100
commitd8e06a7e0829c84aa7c773252030b73132df8500 (patch)
treec657bccaa08c6b8ca1a280afc239f46b2c6365c1 /cnucnu/__init__.py
parent81aaf9409a83e35550705416425eb4aa6f806e05 (diff)
downloadcnucnu-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__.py5
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}/"