@@ -27,6 +27,9 @@ def toTupleWithTag(self):
2727 def toTupleNoTag (self ):
2828 return [self .major , self .minor , self .patch ]
2929
30+ def lessThan (self , other ):
31+ return self .toTupleNoTag () < other .toTupleNoTag ()
32+
3033 def lessThanOrEqual (self , other ):
3134 return self .toTupleNoTag () <= other .toTupleNoTag ()
3235
@@ -43,7 +46,7 @@ def version_string_to_version(version):
4346# Version number used by CI.
4447ci_version = '1.9.0'
4548
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' ]
4750
4851many_versions_versions = [version_string_to_version (v ) for v in many_versions ]
4952many_versions_versions_asc = sorted (many_versions_versions , key = lambda v : v .toTupleWithTag ())
@@ -58,7 +61,7 @@ def get_single_version(fakeVersionOutput = None):
5861 if kotlinc is None :
5962 raise KotlincNotFoundException ()
6063 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 )
6265 if m is None :
6366 raise Exception ('Cannot detect version of kotlinc (got ' + str (versionOutput ) + ')' )
6467 current_version = version_string_to_version (m .group (1 ))
0 commit comments