This commit is contained in:
Telesphoreo
2018-07-24 19:44:00 -07:00
committed by Seth
parent 0d503a6c06
commit 7278176143
24 changed files with 184 additions and 53 deletions

View File

@ -286,28 +286,39 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
try
{
final Properties props;
final Properties gitprops;
try (InputStream in = plugin.getResource("build.properties"))
{
props = new Properties();
props.load(in);
}
try (InputStream in = plugin.getResource("git.properties"))
{
gitprops = new Properties();
gitprops.load(in);
}
author = props.getProperty("buildAuthor", "unknown");
codename = props.getProperty("buildCodeName", "unknown");
version = props.getProperty("buildVersion", pluginVersion);
number = props.getProperty("buildNumber", "1");
date = gitprops.getProperty("git.build.time", "unknown");
date = props.getProperty("buildDate", "unknown");
}
catch (Exception ex)
{
FLog.severe("Could not load build properties! Did you compile with NetBeans/Maven?");
FLog.severe(ex);
}
try
{
final Properties gitprops;
try (InputStream in = plugin.getResource("git.properties"))
{
gitprops = new Properties();
gitprops.load(in);
}
head = gitprops.getProperty("git.commit.id.abbrev", "unknown");
}
catch (Exception ex)
{
FLog.severe("Could not load build properties! Did you compile with Netbeans/Maven?");
FLog.severe("Could not load Git properties! Is there a valid .git directory?");
FLog.severe(ex);
}
}