diff options
| author | Sho Sakuma <me@m1sk9.dev> | 2026-03-26 06:21:37 +0900 |
|---|---|---|
| committer | Sho Sakuma <me@m1sk9.dev> | 2026-03-26 07:27:51 +0900 |
| commit | e0d1f7a9bc9122d02de829a28a51b9aec8611fa5 (patch) | |
| tree | 8f28eef5f5258bf01c0c4df70cc0df6831d73bc7 /platform-velocity/src | |
| parent | b0e13d04de476cd90eacf59c33e680593d8df0b8 (diff) | |
| download | LunaticChat-e0d1f7a9bc9122d02de829a28a51b9aec8611fa5.tar.gz LunaticChat-e0d1f7a9bc9122d02de829a28a51b9aec8611fa5.tar.bz2 LunaticChat-e0d1f7a9bc9122d02de829a28a51b9aec8611fa5.zip | |
feat: Add Night warning to Status Command
Diffstat (limited to 'platform-velocity/src')
| -rw-r--r-- | platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/BuildInfo.kt | 23 | ||||
| -rw-r--r-- | platform-velocity/src/main/resources/build-info.properties | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/BuildInfo.kt b/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/BuildInfo.kt new file mode 100644 index 0000000..1cb13d4 --- /dev/null +++ b/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/BuildInfo.kt @@ -0,0 +1,23 @@ +package dev.m1sk9.lunaticChat.velocity + +import java.util.Properties + +object BuildInfo { + val version: String + val commitHash: String + val channel: String + + init { + val props = Properties() + BuildInfo::class.java.getResourceAsStream("/build-info.properties")?.use { + props.load(it) + } + version = props.getProperty("version", "unknown") + commitHash = props.getProperty("commit", "unknown") + channel = props.getProperty("channel", "stable") + } + + val isNightly: Boolean get() = channel == "nightly" + + fun versionWithCommit(): String = "$version ($commitHash)" +} diff --git a/platform-velocity/src/main/resources/build-info.properties b/platform-velocity/src/main/resources/build-info.properties new file mode 100644 index 0000000..1f8dbc2 --- /dev/null +++ b/platform-velocity/src/main/resources/build-info.properties @@ -0,0 +1,3 @@ +version=${version} +commit=${gitCommitHash} +channel=${channel} |
