mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-25 04:27:41 +08:00
为 morny system 添加了 CODENAME 属性
- 并添加支持 /runtime /version 命令显示 - 并添加支持 --version 选项显示支持 - 并添加支持启动的版本报告显示支持
This commit is contained in:
parent
c4bdf2846b
commit
07d864fb5d
@ -43,6 +43,9 @@ task updateVersionCode {
|
||||
ant.replaceregexp(match:'VERSION = ["a-zA-Z0-9.\\-_+@]+;', replace:"VERSION = \"$project.version\";", flags:'g', byline:true) {
|
||||
fileset(dir: 'src/main/java/cc/sukazyo/cono/morny', includes: 'GradleProjectConfigures.java')
|
||||
}
|
||||
ant.replaceregexp(match:'CODENAME = ["a-zA-Z0-9]+;', replace:"CODENAME = \"${CODENAME}\";", flags:'g', byline:true) {
|
||||
fileset(dir: 'src/main/java/cc/sukazyo/cono/morny', includes: 'GradleProjectConfigures.java')
|
||||
}
|
||||
ant.replaceregexp(match:'COMPILE_TIMESTAMP = [0-9]+L;', replace:"COMPILE_TIMESTAMP = ${System.currentTimeMillis()}L;", flags:'g', byline:true) {
|
||||
fileset(dir: 'src/main/java/cc/sukazyo/cono/morny', includes: 'GradleProjectConfigures.java')
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
## Core
|
||||
|
||||
VERSION = 0.7.0.13
|
||||
VERSION = 0.7.0.14
|
||||
|
||||
CODENAME = fuzhou
|
||||
|
||||
# dependencies
|
||||
|
||||
|
@ -4,6 +4,7 @@ package cc.sukazyo.cono.morny;
|
||||
* the final field that will be updated by gradle automatically.
|
||||
*/
|
||||
public class GradleProjectConfigures {
|
||||
public static final String VERSION = "0.7.0.13";
|
||||
public static final long COMPILE_TIMESTAMP = 1653744934038L;
|
||||
public static final String VERSION = "0.7.0.14";
|
||||
public static final String CODENAME = "fuzhou";
|
||||
public static final long COMPILE_TIMESTAMP = 1653924732379L;
|
||||
}
|
||||
|
@ -18,6 +18,16 @@ public class MornySystem {
|
||||
*/
|
||||
public static final String VERSION = GradleProjectConfigures.VERSION;
|
||||
|
||||
/**
|
||||
* Morny Coeur 当前的版本代号.<br>
|
||||
* 一个单个单词,一般作为一个大版本的名称,只在重大更新改变<br>
|
||||
* 格式保持为仅由小写字母和数字组成<br>
|
||||
* 有时也可能是复合词或特殊的词句<br>
|
||||
* <br>
|
||||
* 会由 gradle 任务 {@code updateVersionCode} 更新
|
||||
*/
|
||||
public static final String CODENAME = GradleProjectConfigures.CODENAME;
|
||||
|
||||
/**
|
||||
* 获取程序 jar 文件的 md5-hash 值<br>
|
||||
* <br>
|
||||
|
@ -177,13 +177,13 @@ public class ServerMain {
|
||||
logger.info(String.format("""
|
||||
Morny Cono Version
|
||||
- version :
|
||||
%s
|
||||
%s %s
|
||||
- md5hash :
|
||||
%s
|
||||
- co.time :
|
||||
%d
|
||||
%s [UTC]""",
|
||||
MornySystem.VERSION,
|
||||
MornySystem.VERSION, MornySystem.CODENAME.toUpperCase(),
|
||||
MornySystem.getJarMd5(),
|
||||
GradleProjectConfigures.COMPILE_TIMESTAMP,
|
||||
CommonFormatUtils.formatDate(GradleProjectConfigures.COMPILE_TIMESTAMP, 0)
|
||||
@ -197,8 +197,9 @@ public class ServerMain {
|
||||
|
||||
logger.info(String.format("""
|
||||
ServerMain.java Loaded >>>
|
||||
- version %s(%s)(%d)""",
|
||||
MornySystem.VERSION, MornySystem.getJarMd5(), GradleProjectConfigures.COMPILE_TIMESTAMP
|
||||
- version %s %s (%s)(%d)""",
|
||||
MornySystem.VERSION, MornySystem.CODENAME.toUpperCase(),
|
||||
MornySystem.getJarMd5(), GradleProjectConfigures.COMPILE_TIMESTAMP
|
||||
));
|
||||
|
||||
//#
|
||||
|
@ -229,12 +229,14 @@ public class MornyCommands {
|
||||
String.format(
|
||||
"""
|
||||
version:
|
||||
- Morny <code>%s</code>
|
||||
- <code>%s</code>
|
||||
core md5_hash:
|
||||
- <code>%s</code>
|
||||
compile timestamp:
|
||||
- <code>%d</code>
|
||||
- <code>%s [UTC]</code>""",
|
||||
escapeHtml(MornySystem.CODENAME.toUpperCase()),
|
||||
escapeHtml(MornySystem.VERSION),
|
||||
escapeHtml(MornySystem.getJarMd5()),
|
||||
GradleProjectConfigures.COMPILE_TIMESTAMP,
|
||||
@ -274,7 +276,7 @@ public class MornyCommands {
|
||||
- <code>%d</code> / <code>%d</code> MB
|
||||
- <code>%d</code> cores
|
||||
coeur version:
|
||||
- <code>%s</code>
|
||||
- <code>%s</code> (<code>%s</code>)
|
||||
- <code>%s</code>
|
||||
- <code>%s [UTC]</code>
|
||||
- [<code>%d</code>]
|
||||
@ -296,6 +298,7 @@ public class MornyCommands {
|
||||
Runtime.getRuntime().availableProcessors(),
|
||||
// version
|
||||
escapeHtml(MornySystem.VERSION),
|
||||
escapeHtml(MornySystem.CODENAME),
|
||||
escapeHtml(MornySystem.getJarMd5()),
|
||||
escapeHtml(formatDate(GradleProjectConfigures.COMPILE_TIMESTAMP, 0)),
|
||||
GradleProjectConfigures.COMPILE_TIMESTAMP,
|
||||
|
Loading…
Reference in New Issue
Block a user