mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-27 07:05:39 +00:00
Force the exception so we do use Git
This commit is contained in:
parent
c50ed524ed
commit
b633a0b588
@ -5,7 +5,7 @@ Subject: [PATCH] Change version fetcher to AMG
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
index ece77f5ea4b14bbed7c070131b3251ea86764538..bba6e4b2add0b21d455f623ae01cadb901621fd9 100644
|
index ece77f5ea4b14bbed7c070131b3251ea86764538..7437299baa0a8d720e7b374d92530169aed5aa1d 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
@@ -19,7 +19,7 @@ import java.util.stream.StreamSupport;
|
@@ -19,7 +19,7 @@ import java.util.stream.StreamSupport;
|
||||||
@ -28,19 +28,12 @@ index ece77f5ea4b14bbed7c070131b3251ea86764538..bba6e4b2add0b21d455f623ae01cadb9
|
|||||||
final Component history = getHistory();
|
final Component history = getHistory();
|
||||||
|
|
||||||
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
||||||
@@ -56,13 +56,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
@@ -57,7 +57,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||||
|
|
||||||
private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
|
private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
|
||||||
int distance;
|
int distance;
|
||||||
- try {
|
try {
|
||||||
- int jenkinsBuild = Integer.parseInt(versionInfo);
|
- int jenkinsBuild = Integer.parseInt(versionInfo);
|
||||||
- distance = fetchDistanceFromSiteApi(jenkinsBuild, getMinecraftVersion());
|
+ int jenkinsBuild = Integer.parseInt("force-git");
|
||||||
- } catch (NumberFormatException ignored) {
|
distance = fetchDistanceFromSiteApi(jenkinsBuild, getMinecraftVersion());
|
||||||
- versionInfo = versionInfo.replace("\"", "");
|
} catch (NumberFormatException ignored) {
|
||||||
- distance = fetchDistanceFromGitHub(repo, branch, versionInfo);
|
versionInfo = versionInfo.replace("\"", "");
|
||||||
- }
|
|
||||||
+ versionInfo = versionInfo.replace("\"", "");
|
|
||||||
+ distance = fetchDistanceFromGitHub(repo, branch, versionInfo);
|
|
||||||
|
|
||||||
switch (distance) {
|
|
||||||
case -1:
|
|
||||||
|
Loading…
Reference in New Issue
Block a user