2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-17 01:58:03 +00:00

include build date

This commit is contained in:
mohammed jasem alaajel 2023-09-12 16:04:27 +04:00
parent c333cf0163
commit 769f086cb5
No known key found for this signature in database
2 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import java.time.Instant
import java.io.ByteArrayOutputStream
plugins {
@ -48,6 +49,7 @@ blossom {
commit = "$commitStdout".replace("\n", "") // for some reason it adds new line so remove it.
commitStdout.close()
replaceToken("@git_commit@", commit)
replaceToken("@build_date@", "${Instant.now().epochSecond}")
}
java {

View File

@ -15,6 +15,7 @@ public class Constants {
public final static String VERSION = "@version@";
public final static String GIT_COMMIT = "@git_commit@";
public final static long BUILD_DATE = Long.parseLong("@build_date@");
public static String getGithubCommitLink() {
return "https://github.com/ProxioDev/RedisBungee/commit/" + GIT_COMMIT;