mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6e16ee3d13
@ -100,8 +100,8 @@ tasks {
|
|||||||
})"""
|
})"""
|
||||||
}
|
}
|
||||||
.replace(
|
.replace(
|
||||||
Regex("""val version: SemVersion = SemVersion.parse\(".*"\)""")
|
Regex("""const val versionConst:\s+String\s+=\s+".*"""")
|
||||||
) { """val version: SemVersion = SemVersion.parse("${project.version}")""" }
|
) { """const val versionConst: String = "${project.version}"""" }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,9 @@ import java.time.Instant
|
|||||||
|
|
||||||
internal object MiraiConsoleBuildConstants { // auto-filled on build (task :mirai-console:fillBuildConstants)
|
internal object MiraiConsoleBuildConstants { // auto-filled on build (task :mirai-console:fillBuildConstants)
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val buildDate: Instant = Instant.ofEpochSecond(1600663022)
|
val buildDate: Instant = Instant.ofEpochSecond(1601134282)
|
||||||
|
const val versionConst: String = "1.0-RC-dev-29"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val version: SemVersion = SemVersion("1.0-RC-dev-28")
|
val version: SemVersion = SemVersion(versionConst)
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,9 @@ val terminal: Terminal = run {
|
|||||||
private object ConsoleFrontEndDescImpl : MiraiConsoleFrontEndDescription {
|
private object ConsoleFrontEndDescImpl : MiraiConsoleFrontEndDescription {
|
||||||
override val name: String get() = "Terminal"
|
override val name: String get() = "Terminal"
|
||||||
override val vendor: String get() = "Mamoe Technologies"
|
override val vendor: String get() = "Mamoe Technologies"
|
||||||
override val version: SemVersion = net.mamoe.mirai.console.internal.MiraiConsoleBuildConstants.version
|
// net.mamoe.mirai.console.internal.MiraiConsoleBuildConstants.version
|
||||||
|
// is console's version not frontend's version
|
||||||
|
override val version: SemVersion = SemVersion(net.mamoe.mirai.console.internal.MiraiConsoleBuildConstants.versionConst)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val ANSI_RESET = Ansi().reset().toString()
|
private val ANSI_RESET = Ansi().reset().toString()
|
||||||
|
@ -59,7 +59,8 @@ object MiraiConsoleTerminalLoader {
|
|||||||
@ConsoleTerminalExperimentalApi
|
@ConsoleTerminalExperimentalApi
|
||||||
fun printHelpMessage() {
|
fun printHelpMessage() {
|
||||||
val help = listOf(
|
val help = listOf(
|
||||||
"" to "Mirai-Console[Terminal FrontEnd] v" + kotlin.runCatching {
|
"" to "Mirai-Console[Terminal FrontEnd] v" + net.mamoe.mirai.console.internal.MiraiConsoleBuildConstants.versionConst,
|
||||||
|
"" to " [ BackEnd] v" + kotlin.runCatching {
|
||||||
net.mamoe.mirai.console.internal.MiraiConsoleBuildConstants.version
|
net.mamoe.mirai.console.internal.MiraiConsoleBuildConstants.version
|
||||||
}.getOrElse { "<unknown>" },
|
}.getOrElse { "<unknown>" },
|
||||||
"" to "",
|
"" to "",
|
||||||
@ -171,14 +172,18 @@ internal fun overrideSTD() {
|
|||||||
PrintStream(
|
PrintStream(
|
||||||
BufferedOutputStream(
|
BufferedOutputStream(
|
||||||
logger = DefaultLogger("stdout").run { ({ line: String? -> info(line) }) }
|
logger = DefaultLogger("stdout").run { ({ line: String? -> info(line) }) }
|
||||||
)
|
),
|
||||||
|
false,
|
||||||
|
"UTF-8"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
System.setErr(
|
System.setErr(
|
||||||
PrintStream(
|
PrintStream(
|
||||||
BufferedOutputStream(
|
BufferedOutputStream(
|
||||||
logger = DefaultLogger("stderr").run { ({ line: String? -> warning(line) }) }
|
logger = DefaultLogger("stderr").run { ({ line: String? -> warning(line) }) }
|
||||||
)
|
),
|
||||||
|
false,
|
||||||
|
"UTF-8"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user