diff --git a/pom.xml b/pom.xml index ea96730..7e07aa0 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,7 @@ 17 17 TheSilentPro (Silent) + dd-MM-yyyy HH:mm:ss ${maven.build.timestamp} @@ -133,7 +134,7 @@ build-properties - validate + generate-resources create create-metadata @@ -144,16 +145,15 @@ true true - ${basedir}/build/buildNumber.properties - ${basedir}/build - build.properties + build.number + build.revision + build.branch - true + false 7 0 buildNumber - timestamp scmVersion diff --git a/src/main/java/tsp/headdb/core/util/BuildProperties.java b/src/main/java/tsp/headdb/core/util/BuildProperties.java index a84c6c4..caef439 100644 --- a/src/main/java/tsp/headdb/core/util/BuildProperties.java +++ b/src/main/java/tsp/headdb/core/util/BuildProperties.java @@ -15,6 +15,8 @@ public class BuildProperties { private String version = "unknown"; private int buildNumber = 0; + private String revision = "unknown"; + private String branch = "unknown"; private String timestamp = "unknown"; private String author = "unknown"; @@ -28,6 +30,8 @@ public class BuildProperties { YamlConfiguration data = YamlConfiguration.loadConfiguration(new InputStreamReader(in)); this.version = data.getString("version", "unknown"); this.buildNumber = data.getInt("build", 0); + this.revision = data.getString("buildRevision", "unknown"); + this.branch = data.getString("buildBranch", "unknown"); this.timestamp = data.getString("buildTimestamp", "unknown"); this.author = data.getString("buildAuthor", "unknown"); } @@ -40,6 +44,14 @@ public class BuildProperties { return buildNumber; } + public String getRevision() { + return revision; + } + + public String getBranch() { + return branch; + } + public String getTimestamp() { return timestamp; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 14fdbe0..690c33e 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -9,6 +9,8 @@ author: TheSilentPro (Silent) spigot-id: 84967 build: ${build.number} +buildRevision: ${build.revision} +buildBranch: ${build.branch} buildTimestamp: ${build.timestamp} buildAuthor: ${build.author}