mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Revert "Update VersionFetcher regex for upstream versioning changes"
This reverts commit 56ee5647ab
.
This commit is contained in:
parent
844eb92abf
commit
269e1e95d9
1 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
From ff5e58ca90c1829949af2e08fe7ace095a0ed37a Mon Sep 17 00:00:00 2001
|
||||
From 6383ef269e602f8ecc8b9043942b1f967dd2ce6a Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Mon, 27 May 2019 03:40:05 -0500
|
||||
Subject: [PATCH] Implement Paper VersionChecker
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Implement Paper VersionChecker
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
new file mode 100644
|
||||
index 000000000..1279072ff
|
||||
index 0000000000..ded51d042b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -0,0 +1,115 @@
|
||||
|
@ -24,7 +24,7 @@ index 000000000..1279072ff
|
|||
+import java.net.URL;
|
||||
+
|
||||
+public class PaperVersionFetcher implements VersionFetcher {
|
||||
+ private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9.]*)-(pre[0-9].*-S|S)"); // S is an anchor, will always give '-S' at end
|
||||
+ private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end
|
||||
+ private static final String GITHUB_BRANCH_NAME = "ver/1.14";
|
||||
+ private static @Nullable String mcVer;
|
||||
+
|
||||
|
@ -45,7 +45,7 @@ index 000000000..1279072ff
|
|||
+ java.util.regex.Matcher matcher = VER_PATTERN.matcher(org.bukkit.Bukkit.getBukkitVersion());
|
||||
+ if (matcher.find()) {
|
||||
+ String result = matcher.group();
|
||||
+ mcVer = result.substring(0, result.length() - 2); // strip 'S' anchor and trailing '-'
|
||||
+ mcVer = result.substring(0, result.length() - 2); // strip 'R' anchor and trailing '-'
|
||||
+ } else {
|
||||
+ org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to PaperMC!");
|
||||
+ org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString());
|
||||
|
@ -126,7 +126,7 @@ index 000000000..1279072ff
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index fa32d4bb7..f9059b257 100644
|
||||
index f7fdd0727b..ee5616cdfc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -276,6 +276,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
@ -142,5 +142,5 @@ index fa32d4bb7..f9059b257 100644
|
|||
|
||||
/**
|
||||
--
|
||||
2.22.0
|
||||
2.21.0
|
||||
|
||||
|
|
Loading…
Reference in a new issue