File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import platform
22import re
33import subprocess
4+ import sys
45
56def is_windows ():
67 '''Whether we appear to be running on Windows'''
@@ -35,3 +36,19 @@ def get_single_version():
3536 return matching_minor_versions [- 1 ]
3637
3738 raise Exception (f'No suitable kotlinc version found for { current_version } (got { versionOutput } ; know about { str (many_versions )} )' )
39+
40+ def get_latest_url ():
41+ version = many_versions [- 1 ]
42+ url = 'https://github.com/JetBrains/kotlin/releases/download/v' + version + '/kotlin-compiler-' + version + '.zip'
43+ return url
44+
45+ if __name__ == "__main__" :
46+ args = sys .argv
47+ if len (args ) != 2 :
48+ raise Exception ("Bad arguments" )
49+ command = args [1 ]
50+ if command == 'latest-url' :
51+ print (get_latest_url ())
52+ else :
53+ raise Exception ("Unknown command: " + command )
54+
You can’t perform that action at this time.
0 commit comments