[cli] make -version more usable
This commit is contained in:
committed by
Vasily Levchenko
parent
6ee6f5907d
commit
3e949b4047
@@ -42,6 +42,11 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
|
||||
|
||||
override fun doExecute(@NotNull arguments: K2NativeCompilerArguments, @NotNull configuration: CompilerConfiguration, @NotNull rootDisposable: Disposable, @Nullable paths: KotlinPaths?): ExitCode {
|
||||
|
||||
if (arguments.version) {
|
||||
println("Kotlin/Native: ${KonanVersion.CURRENT}")
|
||||
return ExitCode.OK
|
||||
}
|
||||
|
||||
if (arguments.freeArgs.isEmpty() && !arguments.isUsefulWithoutFreeArgs) {
|
||||
configuration.report(ERROR, "You have not specified any compilation arguments. No output has been produced.")
|
||||
}
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ enum class MetaVersion {
|
||||
|
||||
class KonanVersion(val meta: MetaVersion?, val major: Int, val minor: Int, val maintenance: Int, val build:Int) {
|
||||
companion object {
|
||||
val CURRENT = KonanVersion(MetaVersion.EAP, 0, 1, 0, 0)
|
||||
val CURRENT = KonanVersion(MetaVersion.EAP, 0, 6, 0, 0)
|
||||
}
|
||||
override fun toString() = if (meta != null) "$meta $major.$minor.$maintenance.$build" else "$major.$minor.$maintenance.$build"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user