Skip to content

Commit 91ec8a3

Browse files
authored
Merge pull request #9591 from smowton/smowton/admin/cherry-pick-kotlin-1.7-ci-fixes
Cherry-pick: Fix Kotlin single-version build when the best candidate has trailing version info
2 parents 5abb033 + 95982d2 commit 91ec8a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/kotlin-extractor/kotlin_plugin_versions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def is_windows():
1515
return False
1616

1717
def version_tuple_to_string(version):
18-
return f'{version[0]}.{version[1]}.{version[2]}'
18+
return f'{version[0]}.{version[1]}.{version[2]}{version[3]}'
1919

2020
def version_string_to_tuple(version):
21-
m = re.match(r'([0-9]+)\.([0-9]+)\.([0-9]+)', version)
22-
return tuple([int(m.group(i)) for i in range(1, 4)])
21+
m = re.match(r'([0-9]+)\.([0-9]+)\.([0-9]+)(.*)', version)
22+
return tuple([int(m.group(i)) for i in range(1, 4)] + [m.group(4)])
2323

2424
many_versions = [ '1.4.32', '1.5.0', '1.5.10', '1.5.21', '1.5.31', '1.6.10', '1.7.0-RC', '1.6.20' ]
2525

0 commit comments

Comments
 (0)