3
0
Mirror von https://github.com/TheSilentPro/HeadDB.git synchronisiert 2024-12-27 11:20:05 +01:00
Dieser Commit ist enthalten in:
Silent 2022-11-06 15:43:41 +01:00
Ursprung 1677c5d2e4
Commit 9c497b2ec7
3 geänderte Dateien mit 20 neuen und 6 gelöschten Zeilen

12
pom.xml
Datei anzeigen

@ -17,6 +17,7 @@
<maven.compiler.source>17</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target> <maven.compiler.target>17</maven.compiler.target>
<build.author>TheSilentPro (Silent)</build.author> <build.author>TheSilentPro (Silent)</build.author>
<maven.build.timestamp.format>dd-MM-yyyy HH:mm:ss</maven.build.timestamp.format>
<build.timestamp>${maven.build.timestamp}</build.timestamp> <build.timestamp>${maven.build.timestamp}</build.timestamp>
</properties> </properties>
@ -133,7 +134,7 @@
<executions> <executions>
<execution> <execution>
<id>build-properties</id> <id>build-properties</id>
<phase>validate</phase> <phase>generate-resources</phase>
<goals> <goals>
<goal>create</goal> <goal>create</goal>
<goal>create-metadata</goal> <goal>create-metadata</goal>
@ -144,16 +145,15 @@
<doCheck>true</doCheck> <doCheck>true</doCheck>
<doUpdate>true</doUpdate> <doUpdate>true</doUpdate>
<buildNumberPropertiesFileLocation>${basedir}/build/buildNumber.properties</buildNumberPropertiesFileLocation> <buildNumberPropertyName>build.number</buildNumberPropertyName>
<outputDirectory>${basedir}/build</outputDirectory> <revisionPropertyName>build.revision</revisionPropertyName>
<outputName>build.properties</outputName> <scmBranchPropertyName>build.branch</scmBranchPropertyName>
<useLastCommittedRevision>true</useLastCommittedRevision> <useLastCommittedRevision>false</useLastCommittedRevision>
<shortRevisionLength>7</shortRevisionLength> <shortRevisionLength>7</shortRevisionLength>
<revisionOnScmFailure>0</revisionOnScmFailure> <revisionOnScmFailure>0</revisionOnScmFailure>
<items> <items>
<item>buildNumber</item> <item>buildNumber</item>
<item>timestamp</item>
<item>scmVersion</item> <item>scmVersion</item>
</items> </items>
</configuration> </configuration>

Datei anzeigen

@ -15,6 +15,8 @@ public class BuildProperties {
private String version = "unknown"; private String version = "unknown";
private int buildNumber = 0; private int buildNumber = 0;
private String revision = "unknown";
private String branch = "unknown";
private String timestamp = "unknown"; private String timestamp = "unknown";
private String author = "unknown"; private String author = "unknown";
@ -28,6 +30,8 @@ public class BuildProperties {
YamlConfiguration data = YamlConfiguration.loadConfiguration(new InputStreamReader(in)); YamlConfiguration data = YamlConfiguration.loadConfiguration(new InputStreamReader(in));
this.version = data.getString("version", "unknown"); this.version = data.getString("version", "unknown");
this.buildNumber = data.getInt("build", 0); 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.timestamp = data.getString("buildTimestamp", "unknown");
this.author = data.getString("buildAuthor", "unknown"); this.author = data.getString("buildAuthor", "unknown");
} }
@ -40,6 +44,14 @@ public class BuildProperties {
return buildNumber; return buildNumber;
} }
public String getRevision() {
return revision;
}
public String getBranch() {
return branch;
}
public String getTimestamp() { public String getTimestamp() {
return timestamp; return timestamp;
} }

Datei anzeigen

@ -9,6 +9,8 @@ author: TheSilentPro (Silent)
spigot-id: 84967 spigot-id: 84967
build: ${build.number} build: ${build.number}
buildRevision: ${build.revision}
buildBranch: ${build.branch}
buildTimestamp: ${build.timestamp} buildTimestamp: ${build.timestamp}
buildAuthor: ${build.author} buildAuthor: ${build.author}