Skip to content

Commit 4268914

Browse files
committed
build_info: Fix parsing of versions with no flavor
1 parent 9eef54b commit 4268914

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build_info.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,15 @@ def deduce_software_version(directory):
100100
for line in f.readlines():
101101
match = pattern.match(line)
102102
if match:
103+
flavor = match.group(4)
104+
if flavor == None:
105+
flavor = ""
103106
return {
104107
"major": match.group(1),
105108
"minor": match.group(2),
106109
"patch": match.group(3),
107-
"flavor": match.group(4).lstrip("-"),
108-
"-flavor": match.group(4),
110+
"flavor": flavor.lstrip("-"),
111+
"-flavor": flavor,
109112
"date": match.group(5),
110113
}
111114
raise Exception('No version number found in {}'.format(changes_file))

0 commit comments

Comments
 (0)