Merge pull request #28 from Parabot/development

Development
This commit is contained in:
Jeroen Ketelaar
2015-12-26 18:00:26 +01:00
3 changed files with 21 additions and 4 deletions
+7
View File
@@ -0,0 +1,7 @@
before_script:
- mvn clean
production:
script:
- mvn -U package -Dsettings.security=/home/ci/settings.xml
type: deploy
+5 -4
View File
@@ -28,8 +28,9 @@
<repositories> <repositories>
<repository> <repository>
<id>my-local-repo</id> <id>git-parabot</id>
<url>file://${basedir}/libs</url> <name>Parabot's Git based repo</name>
<url>https://github.com/parabot/Maven-Repository/raw/master/</url>
</repository> </repository>
</repositories> </repositories>
@@ -40,8 +41,8 @@
<version>1.0</version> <version>1.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>jfxrt</groupId> <groupId>javafx</groupId>
<artifactId>jfxrt</artifactId> <artifactId>javafx</artifactId>
<version>1.0</version> <version>1.0</version>
</dependency> </dependency>
</dependencies> </dependencies>
+9
View File
@@ -176,6 +176,7 @@ public class Core {
* @Deprecated use #validVersion instead * @Deprecated use #validVersion instead
* *
* Checks the version of the bot using a variable comparison from the bot code and the Parabot website * Checks the version of the bot using a variable comparison from the bot code and the Parabot website
*
* @return <b>true</b> if no new version is found, otherwise <b>false</b>. * @return <b>true</b> if no new version is found, otherwise <b>false</b>.
*/ */
private static boolean versionValid(){ private static boolean versionValid(){
@@ -208,6 +209,11 @@ public class Core {
return true; 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() { public static boolean validVersion() {
BufferedReader br = WebUtil.getReader(Configuration.GET_BOT_VERSION); BufferedReader br = WebUtil.getReader(Configuration.GET_BOT_VERSION);
try { try {
@@ -238,6 +244,9 @@ public class Core {
return true; return true;
} }
/**
* Validates the cache and removes the cache contents if required
*/
private static void validateCache(){ private static void validateCache(){
File[] cache = Directories.getCachePath().listFiles(); File[] cache = Directories.getCachePath().listFiles();
Integer lowest = null; Integer lowest = null;