Detect major version in presence of patch release
This commit is contained in:
parent
ad7874a730
commit
aaeaa1dd98
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ output_directory = sys.argv[1]
|
|||
release_label = sys.argv[2] if len(sys.argv) > 2 else "unstable"
|
||||
|
||||
major_version = release_label
|
||||
match = re.match("^(r\d)+(\.\d+)?$", major_version)
|
||||
match = re.match("^(r\d)+(\.\d+)*$", major_version)
|
||||
if match:
|
||||
major_version = match.group(1)
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ def main(requested_target_name, keep_intermediates, substitutions):
|
|||
|
||||
def extract_major(s):
|
||||
major_version = s
|
||||
match = re.match("^(r\d)+(\.\d+)?$", s)
|
||||
match = re.match("^(r\d)+(\.\d+)*$", s)
|
||||
if match:
|
||||
major_version = match.group(1)
|
||||
return major_version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue