diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-03-11 13:29:21 -0700 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-03-11 13:29:21 -0700 |
commit | 15c64345202730e85b1eb5b6fdd22d368f21fb90 (patch) | |
tree | d9eec34d9d4f60738d77fd91ce0c25a23ec20846 | |
parent | 0803e581115c6d6df6fd73923b60d31c46dc6cbb (diff) | |
download | rel-html-15c64345202730e85b1eb5b6fdd22d368f21fb90.tar.gz |
rel-html: fix next release mode updates
The linux-next based releases can have mod updates,
so for example for compat-drivers we can have
compat-drivers-2013-03-07 and an assumption was
made we'd always have a -1 release, followed by a
possible -2 release. In practice we've only been
making one release per day though so the mod update
is blank. Fix this by making the regexp that captures
the release mode update as a digit. While at it update
the stable release regexps too to use digit for the
regexp.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rwxr-xr-x | rel-html.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/rel-html.py b/rel-html.py index 6aec1b1..bd3a900 100755 --- a/rel-html.py +++ b/rel-html.py @@ -114,19 +114,19 @@ def __compute_rel_weight(rel_specs): def get_rel_spec(rel): if ("rc" in rel): - m = re.match(r"v*(?P<VERSION>\w+)\.+" \ - "(?P<PATCHLEVEL>\w+)[.]*" \ - "(?P<SUBLEVEL>\w*)" \ + m = re.match(r"v*(?P<VERSION>\d+)\.+" \ + "(?P<PATCHLEVEL>\d+)[.]*" \ + "(?P<SUBLEVEL>\d*)" \ "(?P<EXTRAVERSION>[-rc]+\w*)\-*" \ - "(?P<RELMOD_UPDATE>\w*)[-]*" \ + "(?P<RELMOD_UPDATE>\d*)[-]*" \ "(?P<RELMOD_TYPE>[usnpc]*)", \ rel) else: - m = re.match(r"v*(?P<VERSION>\w+)\.+" \ - "(?P<PATCHLEVEL>\w+)[.]*" \ - "(?P<SUBLEVEL>\w*)[.]*" \ + m = re.match(r"v*(?P<VERSION>\d+)\.+" \ + "(?P<PATCHLEVEL>\d+)[.]*" \ + "(?P<SUBLEVEL>\d*)[.]*" \ "(?P<EXTRAVERSION>\w*)\-*" \ - "(?P<RELMOD_UPDATE>\w*)[-]*" \ + "(?P<RELMOD_UPDATE>\d*)[-]*" \ "(?P<RELMOD_TYPE>[usnpc]*)", \ rel) if (not m): @@ -188,12 +188,12 @@ def compute_rel_weight_next(rel): return 0 if (rel[4] == "-"): m = re.match(r"v*(?P<DATE_VERSION>\w+-*\w*-*\w*)[-]*" \ - "(?P<RELMOD_UPDATE>\w*)[-]*" \ + "(?P<RELMOD_UPDATE>\d*)[-]*" \ "(?P<RELMOD_TYPE>[usnpc]*)", \ rel) else: m = re.match(r"v*(?P<DATE_VERSION>\w+)[-]*" \ - "(?P<RELMOD_UPDATE>\w*)[-]*" \ + "(?P<RELMOD_UPDATE>\d*)[-]*" \ "(?P<RELMOD_TYPE>[usnpc]*)", \ rel) if (not m): @@ -1135,6 +1135,8 @@ def try_rels(rels): def debug_rel_tests(): try_rel_next("2013-01-10-2-u") try_rel_next("20130110-2-u") + try_rel_next("2013-03-07-u") + try_rel_next("2013-03-07") rels = ["2.6.32.3", "3.8", |