Dynamic build dates - see #526
This commit is contained in:
parent
ffdb917f2c
commit
49cffebd9b
@ -18,6 +18,10 @@
|
|||||||
<name>BungeeCord-Proxy</name>
|
<name>BungeeCord-Proxy</name>
|
||||||
<description>Proxy component of the Elastic Portal Suite</description>
|
<description>Proxy component of the Elastic Portal Suite</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
@ -71,6 +75,12 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>BungeeCord</finalName>
|
<finalName>BungeeCord</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<!-- Don't deploy proxy to maven repo, only APIs -->
|
<!-- Don't deploy proxy to maven repo, only APIs -->
|
||||||
@ -89,6 +99,7 @@
|
|||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Main-Class>net.md_5.bungee.BungeeCord</Main-Class>
|
<Main-Class>net.md_5.bungee.BungeeCord</Main-Class>
|
||||||
<Implementation-Version>${describe}</Implementation-Version>
|
<Implementation-Version>${describe}</Implementation-Version>
|
||||||
|
<Specification-Version>${maven.build.timestamp}</Specification-Version>
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -21,6 +21,7 @@ import java.io.IOException;
|
|||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -167,15 +168,18 @@ public class BungeeCord extends ProxyServer
|
|||||||
*/
|
*/
|
||||||
public static void main(String[] args) throws Exception
|
public static void main(String[] args) throws Exception
|
||||||
{
|
{
|
||||||
Calendar deadline = Calendar.getInstance();
|
if ( BungeeCord.class.getPackage().getSpecificationVersion() != null )
|
||||||
deadline.set( 2013, 9, 31 ); // year, month, date
|
|
||||||
if ( Calendar.getInstance().after( deadline ) )
|
|
||||||
{
|
{
|
||||||
System.err.println( "*** Warning, this build is outdated ***" );
|
Calendar deadline = Calendar.getInstance();
|
||||||
System.err.println( "*** Please download a new build from http://ci.md-5.net/job/BungeeCord ***" );
|
deadline.add( Calendar.WEEK_OF_YEAR, 2 );
|
||||||
System.err.println( "*** You will get NO support regarding this build ***" );
|
if ( Calendar.getInstance().after( new SimpleDateFormat( "yyyyMMdd" ).parse( BungeeCord.class.getPackage().getSpecificationVersion() ) ) )
|
||||||
System.err.println( "*** Server will start in 30 seconds ***" );
|
{
|
||||||
Thread.sleep( TimeUnit.SECONDS.toMillis( 30 ) );
|
System.err.println( "*** Warning, this build is outdated ***" );
|
||||||
|
System.err.println( "*** Please download a new build from http://ci.md-5.net/job/BungeeCord ***" );
|
||||||
|
System.err.println( "*** You will get NO support regarding this build ***" );
|
||||||
|
System.err.println( "*** Server will start in 30 seconds ***" );
|
||||||
|
Thread.sleep( TimeUnit.SECONDS.toMillis( 30 ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BungeeCord bungee = new BungeeCord();
|
BungeeCord bungee = new BungeeCord();
|
||||||
|
Loading…
Reference in New Issue
Block a user