Skip to content

Commit 17ebdcf

Browse files
fix calc_release_version.py to sort tags correctly
1 parent 15cc090 commit 17ebdcf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build/calc_release_version.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ def main():
128128
'--merged', 'HEAD',
129129
'--list', '1.*'])
130130
if len(tags) > 0:
131-
release_tag_match = RELEASE_TAG_RE.match(tags.splitlines()[-1])
131+
sorted_tags = tags.splitlines()
132+
sorted_tags.sort(key=LooseVersion)
133+
release_tag_match = RELEASE_TAG_RE.match(sorted_tags[-1])
132134
if release_tag_match:
133135
version_new = {}
134136
version_new['major'] = int(release_tag_match.group('vermaj'))

0 commit comments

Comments
 (0)