Kotlin: Ignore tags when comparing versions

We thought that 1.7.20-Beta > 1.7.20, and so tried to use 1.7.0's
extractor with 1.7.20.
This commit is contained in:
Ian Lynagh
2022-10-25 18:50:08 +01:00
parent 15e5faf5b6
commit dd7ec499df

View File

@@ -49,7 +49,7 @@ def get_single_version(fakeVersionOutput = None):
matching_minor_versions.sort(reverse = True)
for version in matching_minor_versions:
if version <= current_version:
if version[0:3] <= current_version[0:3]:
return version_tuple_to_string(version)
return version_tuple_to_string(matching_minor_versions[-1])