better readability
This commit is contained in:
parent
15b0ac03d1
commit
44d96925e9
@ -53,9 +53,6 @@ class Platinum : JavaPlugin() {
|
||||
version = props.getProperty("version")
|
||||
hash = props.getProperty("gitCommit")
|
||||
logger.info("Loading Platinum v$version")
|
||||
if (version.contains("SNAPSHOT")) {
|
||||
logger.info("Local Git Commit: $hash")
|
||||
}
|
||||
webClient = HttpClient(CIO) {
|
||||
install(ContentNegotiation) {
|
||||
json(Json { ignoreUnknownKeys = true })
|
||||
@ -65,6 +62,7 @@ class Platinum : JavaPlugin() {
|
||||
}
|
||||
}
|
||||
if (version.contains("SNAPSHOT")) {
|
||||
logger.info("Local Git Commit: $hash")
|
||||
logger.info("Getting remote Git Commit...")
|
||||
runBlocking {
|
||||
val res = webClient.get("https://git.jansel.moe/") {
|
||||
@ -76,9 +74,11 @@ class Platinum : JavaPlugin() {
|
||||
val apires: List<CommitApiResponse> = res.body()
|
||||
logger.info("Remote hash: ${apires[0].sha}")
|
||||
if (apires[0].sha == hash) {
|
||||
componentLogger.info(Component.text("Commit Hashes match, ur on the latest snapshot version", TextColor.color(0,255,0)))
|
||||
componentLogger.info(Component.text("Commit Hashes match, ur on the latest snapshot version",
|
||||
TextColor.color(0,255,0)))
|
||||
} else {
|
||||
componentLogger.info(Component.text("Commit Hashes mismatch, either you\'re using a commit that isnt pushed yet or you\'re out of date", TextColor.color(255,0,0)))
|
||||
componentLogger.info(Component.text("Commit Hashes mismatch, either you\'re using a commit that isnt pushed yet or you\'re out of date",
|
||||
TextColor.color(255,0,0)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user