From db67c77b33ea25f442e63138186b258bc802a03e Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Thu, 26 Nov 2015 19:20:14 +0100 Subject: [PATCH] auto build number --- pom.xml | 50 ++++++++++++++++++++++- src/main/java/fr/xephi/authme/AuthMe.java | 5 +-- src/main/resources/plugin.yml | 2 +- 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 70cdf72f..ae2260ab 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,8 @@ AuthMe fr.xephi.authme.AuthMe - [Xephi, sgdc3, DNx5, timvisee, games647, ljacqu] + -1 + Xephi, sgdc3, DNx5, timvisee, games647, ljacqu 1.7 @@ -61,6 +62,20 @@ 1.8.8-R0.1-SNAPSHOT + + + jenkins + + + env.BUILD_NUMBER + + + + ${env.BUILD_NUMBER} + + + + AuthMe-${project.version} src/main/java @@ -112,6 +127,39 @@ + + com.google.code.maven-replacer-plugin + replacer + 1.5.3 + + + prepare-package + + replace + + + + + + /target/**/AuthMe.java + + + + >UNKNOWNVERSION + ${project.version} + + + >BUILDNUMBER + ${buildNumber} + + + >PLUGINAUTHORS + ${pluginAuthors} + + + + + org.apache.maven.plugins diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 060ed5c6..a15e1ae0 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -62,12 +62,11 @@ public class AuthMe extends JavaPlugin { /** * Defines the current AuthMeReloaded version name. */ - private static final String PLUGIN_VERSION_NAME = "5.1-SNAPSHOT"; + private static final String PLUGIN_VERSION_NAME = ">VERSION"; /** * Defines the current AuthMeReloaded version code. */ - // TODO: Increase this number by one when an update is release - private static final int PLUGIN_VERSION_CODE = 100; + private static final int PLUGIN_VERSION_CODE = Integer.parseInt(">BUILDNUMBER"); private static AuthMe plugin; private static Server server; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index edc86ace..4061ca60 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: ${pluginName} -authors: ${pluginAuthors} +authors: [${pluginAuthors}] website: ${project.url} description: ${project.description} main: ${mainClass}