aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch41
-rw-r--r--Spigot-Server-Patches/0001-POM-Changes.patch86
-rw-r--r--Spigot-Server-Patches/0042-Fix-jar-being-shaded-multiple-times.patch8
3 files changed, 101 insertions, 34 deletions
diff --git a/Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch b/Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch
index 3ec7cdbee3..11ba5f103a 100644
--- a/Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch
+++ b/Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch
@@ -1,30 +1,29 @@
-From 17906168cc148f5e0159b13415a6c6be73e07475 Mon Sep 17 00:00:00 2001
+From 386d76f2e47c4d3e3b824d6ec2c25d914fbe6e2c Mon Sep 17 00:00:00 2001
From: Zach Brown <[email protected]>
Date: Sun, 28 Dec 2014 16:28:21 -0600
Subject: [PATCH] Check PaperSpigot versions
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
-index b55abdb..61f7443 100644
+index b55abdb..e91e1d8 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
-@@ -185,7 +185,22 @@ public class VersionCommand extends BukkitCommand {
+@@ -185,7 +185,21 @@ public class VersionCommand extends BukkitCommand {
private void obtainVersion() {
String version = Bukkit.getVersion();
if (version == null) version = "Custom";
- if (version.startsWith("git-Spigot-")) {
+ // PaperSpigot start
+ if (version.startsWith("git-PaperSpigot-")) {
-+ String[] parts = version.substring("git-PaperSpigot-".length()).split("-");
-+ int cbVersions = getDistance("craftbukkit", parts[1].substring(0, parts[1].indexOf(' ')));
++ String[] parts = version.substring("git-PaperSpigot-".length()).split("[-\\s]");
+ int paperSpigotVersions = getDistance("paperspigot", parts[0]);
-+ if (cbVersions == -1 || paperSpigotVersions == -1) {
++ if (paperSpigotVersions == -1) {
+ setVersionMessage("Error obtaining version information");
+ } else {
-+ if (cbVersions == 0 && paperSpigotVersions == 0) {
++ if (paperSpigotVersions == 0) {
+ setVersionMessage("You are running the latest version");
+ } else {
-+ setVersionMessage("You are " + (cbVersions + paperSpigotVersions) + " version(s) behind");
++ setVersionMessage("You are " + paperSpigotVersions + " version(s) behind");
+ }
+ }
+ } else if (version.startsWith("git-Spigot-")) {
@@ -32,15 +31,33 @@ index b55abdb..61f7443 100644
String[] parts = version.substring("git-Spigot-".length()).split("-");
int cbVersions = getDistance("craftbukkit", parts[1].substring(0, parts[1].indexOf(' ')));
int spigotVersions = getDistance("spigot", parts[0]);
-@@ -235,7 +250,7 @@ public class VersionCommand extends BukkitCommand {
- private static int getDistance(String repo, String hash) {
+@@ -232,17 +246,20 @@ public class VersionCommand extends BukkitCommand {
+ }
+ }
+
+- private static int getDistance(String repo, String hash) {
++ private static int getDistance(String repo, String currentVerInt) { // PaperSpigot
try {
BufferedReader reader = Resources.asCharSource(
- new URL("https://hub.spigotmc.org/stash/rest/api/1.0/projects/SPIGOT/repos/" + repo + "/commits?since=" + URLEncoder.encode(hash, "UTF-8") + "&withCounts=true"),
-+ new URL("https://hub.spigotmc.org/stash/rest/api/1.0/projects/PAPER/repos/" + repo + "/commits?since=" + URLEncoder.encode(hash, "UTF-8") + "&withCounts=true"), // PaperSpigot
++ new URL("https://ci.destroystokyo.com/job/PaperSpigot/lastSuccessfulBuild/buildNumber"), // PaperSpigot
Charsets.UTF_8
).openBufferedStream();
try {
+- JSONObject obj = (JSONObject) new JSONParser().parse(reader);
+- return ((Number) obj.get("totalCount")).intValue();
+- } catch (ParseException ex) {
+- ex.printStackTrace();
++ // PaperSpigot start
++ int newVer = Integer.decode(reader.readLine());
++ int currentVer = Integer.decode(currentVerInt);
++ return newVer - currentVer;
++ } catch (NumberFormatException ex) {
++ //ex.printStackTrace();
++ // PaperSpigot end
+ return -1;
+ } finally {
+ reader.close();
--
-1.9.5.msysgit.0
+2.7.1
diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch
index 14252c1e7e..38a61013f3 100644
--- a/Spigot-Server-Patches/0001-POM-Changes.patch
+++ b/Spigot-Server-Patches/0001-POM-Changes.patch
@@ -1,11 +1,11 @@
-From 109279a4b9b86578f35995e8b7b5024fd422a56d Mon Sep 17 00:00:00 2001
+From 9e315343a720a550c61568b70657ad2076501022 Mon Sep 17 00:00:00 2001
From: Zach Brown <[email protected]>
Date: Thu, 19 Mar 2015 19:41:15 -0500
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
-index 91627ff..cdbb1ca 100644
+index 91627ff..fd051da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
@@ -55,31 +55,81 @@ index 91627ff..cdbb1ca 100644
<version>${project.version}</version>
<type>jar</type>
<scope>compile</scope>
-@@ -108,11 +109,11 @@
- <version>0.2</version>
- <executions>
- <execution>
+@@ -96,6 +97,11 @@
+ <id>spigotmc-public</id>
+ <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
+ </pluginRepository>
++ <!-- PaperSpigot - Repo for gitdescribe -->
++ <pluginRepository>
++ <id>destroystokyo</id>
++ <url>https://ci.destroystokyo.com/plugin/repository/everything/</url>
++ </pluginRepository>
+ </pluginRepositories>
+
+ <!-- This builds a completely 'ready to start' jar with all dependencies inside -->
+@@ -103,36 +109,22 @@
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <plugin>
+- <groupId>net.md-5</groupId>
+- <artifactId>scriptus</artifactId>
+- <version>0.2</version>
+- <executions>
+- <execution>
- <id>ex-spigot</id>
-+ <id>ex-paperspigot</id>
- <configuration>
+- <configuration>
- <format>git-Spigot-%s</format>
-+ <format>git-PaperSpigot-%s</format>
- <scmDirectory>../</scmDirectory>
+- <scmDirectory>../</scmDirectory>
- <descriptionProperty>spigot.desc</descriptionProperty>
-+ <descriptionProperty>paperspigot.desc</descriptionProperty>
- </configuration>
- <phase>initialize</phase>
- <goals>
-@@ -142,7 +143,7 @@
+- </configuration>
+- <phase>initialize</phase>
+- <goals>
+- <goal>describe</goal>
+- </goals>
+- </execution>
+- <execution>
+- <id>ex-craftbukkit</id>
+- <configuration>
+- <format>-%s</format>
+- <scmDirectory>../../CraftBukkit</scmDirectory>
+- <descriptionProperty>craftbukkit.desc</descriptionProperty>
+- </configuration>
+- <phase>initialize</phase>
+- <goals>
+- <goal>describe</goal>
+- </goals>
+- </execution>
+- </executions>
+- </plugin>
++ <groupId>com.lukegb.mojo</groupId>
++ <artifactId>gitdescribe-maven-plugin</artifactId>
++ <version>1.3</version>
++ <configuration>
++ <outputPrefix>git-PaperSpigot-</outputPrefix>
++ <scmDirectory>..</scmDirectory>
++ </configuration>
++ <executions>
++ <execution>
++ <phase>compile</phase>
++ <goals>
++ <goal>gitdescribe</goal>
++ </goals>
++ </execution>
++ </executions>
++ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+@@ -142,7 +134,7 @@
<manifestEntries>
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
<Implementation-Title>CraftBukkit</Implementation-Title>
- <Implementation-Version>${spigot.desc}${craftbukkit.desc}</Implementation-Version>
-+ <Implementation-Version>${paperspigot.desc}${craftbukkit.desc}</Implementation-Version>
++ <Implementation-Version>${describe}</Implementation-Version>
<Implementation-Vendor>Bukkit Team</Implementation-Vendor>
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
-@@ -172,26 +173,6 @@
+@@ -172,26 +164,6 @@
</configuration>
</plugin>
<plugin>
@@ -133,5 +183,5 @@ index 9304637..3a4b142 100644
if (stream != null) {
--
-2.7.0
+2.7.1
diff --git a/Spigot-Server-Patches/0042-Fix-jar-being-shaded-multiple-times.patch b/Spigot-Server-Patches/0042-Fix-jar-being-shaded-multiple-times.patch
index c40990ffc9..5c5a8d22b2 100644
--- a/Spigot-Server-Patches/0042-Fix-jar-being-shaded-multiple-times.patch
+++ b/Spigot-Server-Patches/0042-Fix-jar-being-shaded-multiple-times.patch
@@ -1,14 +1,14 @@
-From cdb68182791c146d28e7a9f18651f907ef7343d3 Mon Sep 17 00:00:00 2001
+From d50dae836a3d3f52e9c5be6089246adadbb71628 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <[email protected]>
Date: Thu, 30 Apr 2015 22:42:34 -0400
Subject: [PATCH] Fix jar being shaded multiple times
diff --git a/pom.xml b/pom.xml
-index cdbb1ca..b4ead1d 100644
+index 19e47f4..68073c0 100644
--- a/pom.xml
+++ b/pom.xml
-@@ -139,6 +139,7 @@
+@@ -130,6 +130,7 @@
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
@@ -17,5 +17,5 @@ index cdbb1ca..b4ead1d 100644
<manifestEntries>
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
--
-2.7.0
+2.7.1