Add commit id to the version

This commit is contained in:
games647
2017-02-14 14:01:57 +01:00
parent 70a81bfcdf
commit f37cc0a0db
4 changed files with 21 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# project informations for Bukkit in order to register our plugin with all it components
# ${-} are variables from Maven (pom.xml) which will be replaced after the build
name: ${project.parent.name}
version: ${project.version}
version: ${project.version}-git${git.commit.id}
main: ${project.groupId}.${project.artifactId}.${project.name}
# meta informations for plugin managers

View File

@ -43,8 +43,6 @@ public class FastLoginBungee extends Plugin implements PlatformPlugin<CommandSen
@Override
public void onEnable() {
System.out.println(this.getDescription());
core = new FastLoginCore<>(this);
core.load();
if (!core.setupDatabase()) {

View File

@ -5,7 +5,7 @@ name: ${project.parent.name}
# ${-} will be automatically replaced by Maven
main: ${project.groupId}.${project.artifactId}.${project.name}
version: ${project.version}
version: ${project.version}-git${git.commit.id}
author: games647, http://github.com/games647/FastLogin/graphs/contributors
softDepends:

20
pom.xml
View File

@ -19,6 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!--Possibility to deploy directly to the plugins folder-->
<outputDir>${basedir}/target</outputDir>
<git.commit.id>Unknown</git.commit.id>
</properties>
<modules>
@ -48,7 +49,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -56,6 +57,23 @@
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>