build_info: Fix parsing of versions with no flavor
This commit is contained in:
parent
9eef54b251
commit
4268914774
1 changed files with 5 additions and 2 deletions
|
|
@ -100,12 +100,15 @@ def deduce_software_version(directory):
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
match = pattern.match(line)
|
match = pattern.match(line)
|
||||||
if match:
|
if match:
|
||||||
|
flavor = match.group(4)
|
||||||
|
if flavor == None:
|
||||||
|
flavor = ""
|
||||||
return {
|
return {
|
||||||
"major": match.group(1),
|
"major": match.group(1),
|
||||||
"minor": match.group(2),
|
"minor": match.group(2),
|
||||||
"patch": match.group(3),
|
"patch": match.group(3),
|
||||||
"flavor": match.group(4).lstrip("-"),
|
"flavor": flavor.lstrip("-"),
|
||||||
"-flavor": match.group(4),
|
"-flavor": flavor,
|
||||||
"date": match.group(5),
|
"date": match.group(5),
|
||||||
}
|
}
|
||||||
raise Exception('No version number found in {}'.format(changes_file))
|
raise Exception('No version number found in {}'.format(changes_file))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue