diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..99ff537 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,7 @@ +before_script: + - mvn clean + +production: + script: + - mvn -U package -Dsettings.security=/home/ci/settings.xml + type: deploy \ No newline at end of file diff --git a/pom.xml b/pom.xml index 570f293..3422ead 100644 --- a/pom.xml +++ b/pom.xml @@ -28,8 +28,9 @@ - my-local-repo - file://${basedir}/libs + git-parabot + Parabot's Git based repo + https://github.com/parabot/Maven-Repository/raw/master/ @@ -40,8 +41,8 @@ 1.0 - jfxrt - jfxrt + javafx + javafx 1.0 diff --git a/src/main/java/org/parabot/core/Core.java b/src/main/java/org/parabot/core/Core.java index bb39d45..57cada3 100644 --- a/src/main/java/org/parabot/core/Core.java +++ b/src/main/java/org/parabot/core/Core.java @@ -176,6 +176,7 @@ public class Core { * @Deprecated use #validVersion instead * * Checks the version of the bot using a variable comparison from the bot code and the Parabot website + * * @return true if no new version is found, otherwise false. */ private static boolean versionValid(){ @@ -208,6 +209,11 @@ public class Core { return true; } + /** + * Compares the latest version from the BDN and the current version + * + * @return True if the current version is equal or higher than the latest version, false if lower than the latest version + */ public static boolean validVersion() { BufferedReader br = WebUtil.getReader(Configuration.GET_BOT_VERSION); try { @@ -238,6 +244,9 @@ public class Core { return true; } + /** + * Validates the cache and removes the cache contents if required + */ private static void validateCache(){ File[] cache = Directories.getCachePath().listFiles(); Integer lowest = null;