mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
update date check, fix version String
This commit is contained in:
@@ -29,9 +29,9 @@ public class GitLogs {
|
|||||||
if (entry.updated == null)
|
if (entry.updated == null)
|
||||||
continue;
|
continue;
|
||||||
Date feedDate = atomDate.parse(entry.updated);
|
Date feedDate = atomDate.parse(entry.updated);
|
||||||
if (buildDateOriginal != null && feedDate.before(buildDateOriginal))
|
if (buildDateOriginal != null && feedDate.toInstant().isBefore(buildDateOriginal.toInstant()))
|
||||||
continue;
|
continue;
|
||||||
if (maxDate != null && feedDate.after(maxDate))
|
if (maxDate != null && feedDate.toInstant().isAfter(maxDate.toInstant()))
|
||||||
continue;
|
continue;
|
||||||
logs.append(simpleDate.format(feedDate)).append(" | ").append(StringEscapeUtils.unescapeXml(title).replace("\n", "").replace(" ", "")).append("\n\n");
|
logs.append(simpleDate.format(feedDate)).append(" | ").append(StringEscapeUtils.unescapeXml(title).replace("\n", "").replace(" ", "")).append("\n\n");
|
||||||
if (c >= 15)
|
if (c >= 15)
|
||||||
|
|||||||
@@ -72,11 +72,7 @@ public class AssetsDownloader {
|
|||||||
final String releaseTag = Forge.getDeviceAdapter().getReleaseTag(GITHUB_RELEASES_ATOM);
|
final String releaseTag = Forge.getDeviceAdapter().getReleaseTag(GITHUB_RELEASES_ATOM);
|
||||||
try {
|
try {
|
||||||
URL versionUrl = new URL(versionText);
|
URL versionUrl = new URL(versionText);
|
||||||
String version = "";
|
String version = isSnapshots ? FileUtil.readFileToString(versionUrl) : releaseTag.replace("forge-", "");
|
||||||
if (GuiBase.isAndroid())
|
|
||||||
version = FileUtil.readFileToString(versionUrl);
|
|
||||||
else //instead of parsing xml from earlier releases, get the latest github release tag
|
|
||||||
version = releaseTag.replace("forge-", "");
|
|
||||||
String filename = "";
|
String filename = "";
|
||||||
String installerURL = "";
|
String installerURL = "";
|
||||||
if (GuiBase.isAndroid()) {
|
if (GuiBase.isAndroid()) {
|
||||||
@@ -121,6 +117,7 @@ public class AssetsDownloader {
|
|||||||
if (!Forge.getDeviceAdapter().isConnectedToWifi()) {
|
if (!Forge.getDeviceAdapter().isConnectedToWifi()) {
|
||||||
message += " If so, you may want to connect to wifi first. The download is around " + (GuiBase.isAndroid() ? apkSize : packageSize) + ".";
|
message += " If so, you may want to connect to wifi first. The download is around " + (GuiBase.isAndroid() ? apkSize : packageSize) + ".";
|
||||||
}
|
}
|
||||||
|
if (isSnapshots) // this is for snaps initial info
|
||||||
message += Forge.getDeviceAdapter().getLatestChanges(GITHUB_COMMITS_ATOM, buildTimeStamp, snapsTimestamp);
|
message += Forge.getDeviceAdapter().getLatestChanges(GITHUB_COMMITS_ATOM, buildTimeStamp, snapsTimestamp);
|
||||||
//failed to grab latest github tag
|
//failed to grab latest github tag
|
||||||
if (!isSnapshots && releaseTag.isEmpty()) {
|
if (!isSnapshots && releaseTag.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user