summaryrefslogtreecommitdiffstats
path: root/cnucnu/helper.py
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-04-04 00:04:44 +0300
committerTill Maas <opensource@till.name>2011-04-14 17:23:16 +0200
commit852bc954fa63a623fb97f1cf196a663c5848657c (patch)
tree1c9e616f4de6c4bd73982ae475343edf3fe0226d /cnucnu/helper.py
parent3d6841fba40388746a394053a50bd7938527e721 (diff)
downloadcnucnu-852bc954fa63a623fb97f1cf196a663c5848657c.tar.gz
cnucnu-852bc954fa63a623fb97f1cf196a663c5848657c.tar.xz
cnucnu-852bc954fa63a623fb97f1cf196a663c5848657c.zip
Add beta and alpha RC comparison support.
Diffstat (limited to 'cnucnu/helper.py')
-rw-r--r--cnucnu/helper.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cnucnu/helper.py b/cnucnu/helper.py
index 5301c84..14ed28e 100644
--- a/cnucnu/helper.py
+++ b/cnucnu/helper.py
@@ -158,7 +158,7 @@ def upstream_cmp(v1, v2):
# both are rc, higher rc is newer
diff = cmp(rc1.lower(), rc2.lower())
if diff != 0:
- # rc is newer than pre etc
+ # rc > pre > beta > alpha
return diff
if rcn1 and rcn2:
# both have rc number
@@ -183,8 +183,8 @@ def upstream_cmp(v1, v2):
return 0
-__rc_ups_regex = re.compile("(.*?)(-?(rc|pre)([0-9]*))", re.I)
-__rc_rel_regex = re.compile(r'0\.[0-9]+\.(rc|pre)([0-9]*)', re.I)
+__rc_ups_regex = re.compile("(.*?)(-?(rc|pre|beta|alpha)([0-9]*))", re.I)
+__rc_rel_regex = re.compile(r'0\.[0-9]+\.(rc|pre|beta|alpha)([0-9]*)', re.I)
def split_rc(version):
""" Split version into version and release candidate string +