Fixes #976 Now uses GitHub to retrieve most current version

Reworked whole Version Checker with an extensible interface to add any other service later on easier.
The version checker now has its own config file, to collect the different options and extract them from the main config file.
In that you can specify how fine the versions should be checked.
This commit is contained in:
thatsIch
2015-03-09 17:35:19 +01:00
parent 720b38442e
commit 6baf952904
33 changed files with 2023 additions and 169 deletions
@@ -0,0 +1,35 @@
package appeng.services.version;
/**
* AE prints version like rv2-beta-8
* GitHub prints version like rv2.beta.8
*/
public final class DefaultVersion extends BaseVersion
{
/**
* @param revision natural number
* @param channel either alpha, beta or release
* @param build natural number
*/
public DefaultVersion( int revision, Channel channel, int build )
{
super( revision, channel, build );
}
@Override
public boolean isNewerAs( Version maybeOlder )
{
if ( this.revision() > maybeOlder.revision() )
{
return true;
}
if ( this.channel().compareTo( maybeOlder.channel() ) > 0 )
{
return true;
}
return this.build() > maybeOlder.build();
}
}