@@ -27,6 +27,9 @@ def toTupleWithTag(self):
27
27
def toTupleNoTag (self ):
28
28
return [self .major , self .minor , self .patch ]
29
29
30
+ def lessThan (self , other ):
31
+ return self .toTupleNoTag () < other .toTupleNoTag ()
32
+
30
33
def lessThanOrEqual (self , other ):
31
34
return self .toTupleNoTag () <= other .toTupleNoTag ()
32
35
@@ -43,7 +46,7 @@ def version_string_to_version(version):
43
46
# Version number used by CI.
44
47
ci_version = '1.9.0'
45
48
46
- many_versions = [ '1.5.0' , '1.5.10' , '1.5.20' , '1.5.30' , '1.6.0' , '1.6.20' , '1.7.0' , '1.7.20' , '1.8.0' , '1.9.0-Beta' , '1.9.20-Beta' ]
49
+ many_versions = [ '1.5.0' , '1.5.10' , '1.5.20' , '1.5.30' , '1.6.0' , '1.6.20' , '1.7.0' , '1.7.20' , '1.8.0' , '1.9.0-Beta' , '1.9.20-Beta' , '2.0.0-Beta1' ]
47
50
48
51
many_versions_versions = [version_string_to_version (v ) for v in many_versions ]
49
52
many_versions_versions_asc = sorted (many_versions_versions , key = lambda v : v .toTupleWithTag ())
@@ -58,7 +61,7 @@ def get_single_version(fakeVersionOutput = None):
58
61
if kotlinc is None :
59
62
raise KotlincNotFoundException ()
60
63
versionOutput = subprocess .run ([kotlinc , '-version' ], stdout = subprocess .PIPE , stderr = subprocess .PIPE , universal_newlines = True ).stderr if fakeVersionOutput is None else fakeVersionOutput
61
- m = re .match (r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+-? [a-zA-Z]* ) .*' , versionOutput )
64
+ m = re .match (r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+(- [a-zA-Z][a-zA-Z0-9]*)? ) .*' , versionOutput )
62
65
if m is None :
63
66
raise Exception ('Cannot detect version of kotlinc (got ' + str (versionOutput ) + ')' )
64
67
current_version = version_string_to_version (m .group (1 ))
0 commit comments