mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-24 20:17:38 +08:00
将 COMPILE_TIMESTAMP 改为基于 commit time 的 CODE_TIMESTAMP
This commit is contained in:
parent
5dfe07f586
commit
3c7de7037d
@ -44,6 +44,7 @@ String proj_version = proj_version_base
|
|||||||
if (proj_version_use_delta) proj_version += "-δ${proj_version_delta}"
|
if (proj_version_use_delta) proj_version += "-δ${proj_version_delta}"
|
||||||
if (proj_git) proj_version += "+git.${proj_commit.substring(0, 8)}" + (proj_clean?"":".δ")
|
if (proj_git) proj_version += "+git.${proj_commit.substring(0, 8)}" + (proj_clean?"":".δ")
|
||||||
final String proj_version_codename = CODENAME
|
final String proj_version_codename = CODENAME
|
||||||
|
final long proj_code_time = proj_clean ? grgit.head().dateTime.toInstant().toEpochMilli() : System.currentTimeMillis()
|
||||||
|
|
||||||
final JavaVersion proj_java = JavaVersion.VERSION_17
|
final JavaVersion proj_java = JavaVersion.VERSION_17
|
||||||
final Charset proj_file_encoding = StandardCharsets.UTF_8
|
final Charset proj_file_encoding = StandardCharsets.UTF_8
|
||||||
@ -107,7 +108,7 @@ buildConfig {
|
|||||||
buildConfigField('String', 'VERSION', "\"${proj_version}\"")
|
buildConfigField('String', 'VERSION', "\"${proj_version}\"")
|
||||||
buildConfigField('String', 'VERSION_DELTA', "\"${proj_version_delta}\"")
|
buildConfigField('String', 'VERSION_DELTA', "\"${proj_version_delta}\"")
|
||||||
buildConfigField('String', 'CODENAME', "\"${proj_version_codename}\"")
|
buildConfigField('String', 'CODENAME', "\"${proj_version_codename}\"")
|
||||||
buildConfigField('long', 'COMPILE_TIMESTAMP', "${System.currentTimeMillis()}L")
|
buildConfigField('long', 'CODE_TIMESTAMP', "${proj_code_time}L")
|
||||||
buildConfigField('String', 'COMMIT', proj_git ? "\"${proj_commit}\"" : "null")
|
buildConfigField('String', 'COMMIT', proj_git ? "\"${proj_commit}\"" : "null")
|
||||||
buildConfigField('boolean', 'CLEAN_BUILD', "${proj_clean}")
|
buildConfigField('boolean', 'CLEAN_BUILD', "${proj_clean}")
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
MORNY_ARCHIVE_NAME = morny-coeur
|
MORNY_ARCHIVE_NAME = morny-coeur
|
||||||
|
|
||||||
VERSION = 1.0.0-alpha2
|
VERSION = 1.0.0-alpha3
|
||||||
|
|
||||||
USE_DELTA = true
|
USE_DELTA = true
|
||||||
VERSION_DELTA = 11061900
|
VERSION_DELTA = 11061142
|
||||||
|
|
||||||
CODENAME = beiping
|
CODENAME = beiping
|
||||||
|
|
||||||
|
@ -192,8 +192,8 @@ public class ServerMain {
|
|||||||
%s [UTC]""",
|
%s [UTC]""",
|
||||||
MornySystem.VERSION, MornySystem.CODENAME.toUpperCase(),
|
MornySystem.VERSION, MornySystem.CODENAME.toUpperCase(),
|
||||||
MornySystem.getJarMd5(),
|
MornySystem.getJarMd5(),
|
||||||
BuildConfig.COMPILE_TIMESTAMP,
|
BuildConfig.CODE_TIMESTAMP,
|
||||||
CommonFormat.formatDate(BuildConfig.COMPILE_TIMESTAMP, 0)
|
CommonFormat.formatDate(BuildConfig.CODE_TIMESTAMP, 0)
|
||||||
));
|
));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ public class ServerMain {
|
|||||||
- version %s (%s)(%d)
|
- version %s (%s)(%d)
|
||||||
- Morny %s""",
|
- Morny %s""",
|
||||||
MornySystem.VERSION,
|
MornySystem.VERSION,
|
||||||
MornySystem.getJarMd5(), BuildConfig.COMPILE_TIMESTAMP,
|
MornySystem.getJarMd5(), BuildConfig.CODE_TIMESTAMP,
|
||||||
MornySystem.CODENAME.toUpperCase()
|
MornySystem.CODENAME.toUpperCase()
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -243,14 +243,14 @@ public class MornyCommands {
|
|||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
core md5_hash:
|
core md5_hash:
|
||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
compile timestamp:
|
coding timestamp:
|
||||||
- <code>%d</code>
|
- <code>%d</code>
|
||||||
- <code>%s [UTC]</code>""",
|
- <code>%s [UTC]</code>""",
|
||||||
escapeHtml(MornySystem.CODENAME.toUpperCase()),
|
escapeHtml(MornySystem.CODENAME.toUpperCase()),
|
||||||
escapeHtml(MornySystem.VERSION),
|
escapeHtml(MornySystem.VERSION),
|
||||||
escapeHtml(MornySystem.getJarMd5()),
|
escapeHtml(MornySystem.getJarMd5()),
|
||||||
BuildConfig.COMPILE_TIMESTAMP,
|
BuildConfig.CODE_TIMESTAMP,
|
||||||
escapeHtml(formatDate(BuildConfig.COMPILE_TIMESTAMP, 0))
|
escapeHtml(formatDate(BuildConfig.CODE_TIMESTAMP, 0))
|
||||||
)
|
)
|
||||||
).replyToMessageId(event.message().messageId()).parseMode(ParseMode.HTML));
|
).replyToMessageId(event.message().messageId()).parseMode(ParseMode.HTML));
|
||||||
}
|
}
|
||||||
@ -310,8 +310,8 @@ public class MornyCommands {
|
|||||||
escapeHtml(MornySystem.VERSION),
|
escapeHtml(MornySystem.VERSION),
|
||||||
escapeHtml(MornySystem.CODENAME),
|
escapeHtml(MornySystem.CODENAME),
|
||||||
escapeHtml(MornySystem.getJarMd5()),
|
escapeHtml(MornySystem.getJarMd5()),
|
||||||
escapeHtml(formatDate(BuildConfig.COMPILE_TIMESTAMP, 0)),
|
escapeHtml(formatDate(BuildConfig.CODE_TIMESTAMP, 0)),
|
||||||
BuildConfig.COMPILE_TIMESTAMP,
|
BuildConfig.CODE_TIMESTAMP,
|
||||||
// continuous
|
// continuous
|
||||||
escapeHtml(formatDuration(System.currentTimeMillis() - MornyCoeur.coeurStartTimestamp)),
|
escapeHtml(formatDuration(System.currentTimeMillis() - MornyCoeur.coeurStartTimestamp)),
|
||||||
System.currentTimeMillis() - MornyCoeur.coeurStartTimestamp,
|
System.currentTimeMillis() - MornyCoeur.coeurStartTimestamp,
|
||||||
|
Loading…
Reference in New Issue
Block a user