mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
common, fancynpcs, fancyholograms-v2, fancyholograms-v3, ci: Add channel and platform to version config
This commit is contained in:
@@ -150,7 +150,9 @@ tasks {
|
||||
val props = mapOf(
|
||||
"description" to project.description,
|
||||
"version" to getFHVersion(),
|
||||
"hash" to getCurrentCommitHash(),
|
||||
"commit_hash" to getCurrentCommitHash(),
|
||||
"channel" to (System.getenv("RELEASE_CHANNEL") ?: "").ifEmpty { "undefined" },
|
||||
"platform" to (System.getenv("RELEASE_PLATFORM") ?: "").ifEmpty { "undefined" }
|
||||
)
|
||||
|
||||
inputs.properties(props)
|
||||
|
||||
@@ -32,7 +32,7 @@ public class FHMetrics {
|
||||
|
||||
HologramRegistry registry = FancyHologramsPlugin.get().getRegistry();
|
||||
|
||||
fancyAnalytics.registerStringMetric(new MetricSupplier<>("commit_hash", () -> FancyHologramsPlugin.get().getVersionConfig().getHash().substring(0, 7)));
|
||||
fancyAnalytics.registerStringMetric(new MetricSupplier<>("commit_hash", () -> FancyHologramsPlugin.get().getVersionConfig().getCommitHash().substring(0, 7)));
|
||||
|
||||
fancyAnalytics.registerStringMetric(new MetricSupplier<>("server_size", () -> {
|
||||
long onlinePlayers = Bukkit.getOnlinePlayers().size();
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
version: $version
|
||||
hash: $hash
|
||||
commit_hash: $commit_hash
|
||||
platform: $platform
|
||||
channel: $channel
|
||||
Reference in New Issue
Block a user