Fix version-extraction regexp
Fixes https://github.com/matrix-org/matrix-doc/issues/982
This commit is contained in:
parent
a42d3011b7
commit
13d3293378
2 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ else:
|
||||||
release_label = sys.argv[2] if len(sys.argv) > 2 else "unstable"
|
release_label = sys.argv[2] if len(sys.argv) > 2 else "unstable"
|
||||||
|
|
||||||
major_version = release_label
|
major_version = release_label
|
||||||
match = re.match("^(r\d)+(\.\d+)*$", major_version)
|
match = re.match("^(r\d+)(\.\d+)*$", major_version)
|
||||||
if match:
|
if match:
|
||||||
major_version = match.group(1)
|
major_version = match.group(1)
|
||||||
|
|
||||||
|
|
|
@ -469,7 +469,7 @@ def list_targets():
|
||||||
|
|
||||||
def extract_major(s):
|
def extract_major(s):
|
||||||
major_version = s
|
major_version = s
|
||||||
match = re.match("^(r\d)+(\.\d+)*$", s)
|
match = re.match("^(r\d+)(\.\d+)*$", s)
|
||||||
if match:
|
if match:
|
||||||
major_version = match.group(1)
|
major_version = match.group(1)
|
||||||
return major_version
|
return major_version
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue