Improve build process

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-04-22 11:50:23 +10:00
parent 9f7fbec5c6
commit 7eca640bdd
2 changed files with 21 additions and 11 deletions

View File

@@ -178,10 +178,10 @@ public class Main {
}
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor());
Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -14);
deadline.add(Calendar.DAY_OF_YEAR, -21);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");