From 8529704378e16a6b082606e4ac683ab8cfa34dbc Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Sat, 26 Dec 2020 23:44:31 +0800 Subject: [PATCH 1/3] Improve LoginSolver selecting --- .../src/MiraiConsoleImplementationTerminal.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt b/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt index 6c0cf0231..08c20e4b0 100644 --- a/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt +++ b/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt @@ -78,6 +78,7 @@ class MiraiConsoleImplementationTerminal override val isAnsiSupported: Boolean get() = true override fun createLoginSolver(requesterBot: Long, configuration: BotConfiguration): LoginSolver { + LoginSolver.Default?.takeIf { it !is StandardCharImageLoginSolver }?.let { return it } return StandardCharImageLoginSolver(input = { requestInput("LOGIN> ") }) } From 9a7a4e40bbef951849f9f9b86e13ce03ac8bf163 Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Sun, 27 Dec 2020 18:08:26 +0800 Subject: [PATCH 2/3] Don't close console to fast --- backend/mirai-console/src/MiraiConsoleImplementation.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/mirai-console/src/MiraiConsoleImplementation.kt b/backend/mirai-console/src/MiraiConsoleImplementation.kt index 0f5afd22e..bd7791c05 100644 --- a/backend/mirai-console/src/MiraiConsoleImplementation.kt +++ b/backend/mirai-console/src/MiraiConsoleImplementation.kt @@ -219,6 +219,7 @@ public interface MiraiConsoleImplementation : CoroutineScope { }.onFailure { it.printStackTrace() } + Thread.sleep(3000L) // 保证信息打印完成 exitProcess(1) } } From 3511649bd0ddcf84255a6eeabf26305c14f9648a Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Sun, 27 Dec 2020 18:09:52 +0800 Subject: [PATCH 3/3] 2.0-M2-dev-10 --- .../mirai-console/src/internal/MiraiConsoleBuildConstants.kt | 4 ++-- buildSrc/src/main/kotlin/Versions.kt | 4 ++-- tools/gradle-plugin/src/VersionConstants.kt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/mirai-console/src/internal/MiraiConsoleBuildConstants.kt b/backend/mirai-console/src/internal/MiraiConsoleBuildConstants.kt index 3a88bf3e4..36c29efdb 100644 --- a/backend/mirai-console/src/internal/MiraiConsoleBuildConstants.kt +++ b/backend/mirai-console/src/internal/MiraiConsoleBuildConstants.kt @@ -14,8 +14,8 @@ import java.time.Instant internal object MiraiConsoleBuildConstants { // auto-filled on build (task :mirai-console:fillBuildConstants) @JvmStatic - val buildDate: Instant = Instant.ofEpochSecond(1608391573) - const val versionConst: String = "2.0-M1-1" + val buildDate: Instant = Instant.ofEpochSecond(1609063576) + const val versionConst: String = "2.0-M2-dev-10" @JvmStatic val version: SemVersion = SemVersion(versionConst) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 237d33dcb..455841e79 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -12,8 +12,8 @@ import org.gradle.api.attributes.Attribute object Versions { - const val core = "2.0-M2-dev-4" - const val console = "2.0-M2-dev-4" + const val core = "2.0-M2-dev-10" + const val console = "2.0-M2-dev-10" const val consoleGraphical = "0.0.7" const val consoleTerminal = console diff --git a/tools/gradle-plugin/src/VersionConstants.kt b/tools/gradle-plugin/src/VersionConstants.kt index c85d3203d..cc42d6a28 100644 --- a/tools/gradle-plugin/src/VersionConstants.kt +++ b/tools/gradle-plugin/src/VersionConstants.kt @@ -10,6 +10,6 @@ package net.mamoe.mirai.console.gradle internal object VersionConstants { - const val CONSOLE_VERSION = "2.0-M2-dev-4" // value is written here automatically during build - const val CORE_VERSION = "2.0-M2-dev-4" // value is written here automatically during build + const val CONSOLE_VERSION = "2.0-M2-dev-10" // value is written here automatically during build + const val CORE_VERSION = "2.0-M2-dev-10" // value is written here automatically during build } \ No newline at end of file