2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-04 20:38:02 +00:00

include build date

This commit is contained in:
mohammed jasem alaajel 2023-09-12 16:04:27 +04:00 committed by mohammed jasem alaajel
parent dd38532501
commit 7ba54ebfe2
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;