mirror of
https://github.com/plexusorg/Plex.git
synced 2026-06-04 21:46:55 +00:00
Revamp the build system
This commit is contained in:
@@ -8,30 +8,30 @@ import java.util.Properties;
|
||||
|
||||
public class BuildInfo
|
||||
{
|
||||
@Getter
|
||||
public static String number;
|
||||
@Getter
|
||||
public static String author;
|
||||
@Getter
|
||||
public static String commit;
|
||||
@Getter
|
||||
public static String date;
|
||||
@Getter
|
||||
public static String head;
|
||||
public static String number;
|
||||
|
||||
public void load(Plex plugin)
|
||||
{
|
||||
try
|
||||
{
|
||||
Properties props;
|
||||
try (InputStream in = plugin.getResource("build.properties"))
|
||||
try (InputStream in = plugin.getResource("build-vars.properties"))
|
||||
{
|
||||
props = new Properties();
|
||||
props.load(in);
|
||||
}
|
||||
|
||||
author = props.getProperty("author", "unknown");
|
||||
commit = props.getProperty("gitCommit", "unknown");
|
||||
date = props.getProperty("date", "unknown");
|
||||
number = props.getProperty("buildNumber", "unknown");
|
||||
author = props.getProperty("buildAuthor", "unknown");
|
||||
date = props.getProperty("buildDate", "unknown");
|
||||
head = props.getProperty("buildHead", "unknown");
|
||||
}
|
||||
catch (Exception ignored)
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@ public class UpdateChecker implements PlexBase
|
||||
// If it's -4, it hasn't checked for updates yet
|
||||
if (distance == -4)
|
||||
{
|
||||
distance = fetchDistanceFromGitHub(REPO, BRANCH, BuildInfo.getHead());
|
||||
distance = fetchDistanceFromGitHub(REPO, BRANCH, BuildInfo.getCommit());
|
||||
PlexLog.debug("Never checked for updates, checking now...");
|
||||
}
|
||||
else
|
||||
@@ -104,7 +104,7 @@ public class UpdateChecker implements PlexBase
|
||||
// If the request isn't asked to be cached, fetch it
|
||||
if (!cached)
|
||||
{
|
||||
distance = fetchDistanceFromGitHub(REPO, BRANCH, BuildInfo.getHead());
|
||||
distance = fetchDistanceFromGitHub(REPO, BRANCH, BuildInfo.getCommit());
|
||||
PlexLog.debug("We have checked for updates before, but this request was not asked to be cached.");
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user