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>
<repository>
<id>my-local-repo</id>
<url>file://${basedir}/libs</url>
<id>git-parabot</id>
<name>Parabot's Git based repo</name>
<url>https://github.com/parabot/Maven-Repository/raw/master/</url>
</repository>
</repositories>
@@ -40,8 +41,8 @@
<version>1.0</version>
</dependency>
<dependency>
<groupId>jfxrt</groupId>
<artifactId>jfxrt</artifactId>
<groupId>javafx</groupId>
<artifactId>javafx</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
+9
View File
@@ -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 <b>true</b> if no new version is found, otherwise <b>false</b>.
*/
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;