From 9fc220ea02e6355b41c851a041cf7a1bfae419cf Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 21:27:13 -0400 Subject: [PATCH] Use paperclip.properties so CI can work --- .gitignore | 1 + Paperclip | 2 +- Spigot-Server-Patches/MC-Dev-fixes.patch | 13 +++++++++++++ Spigot-Server-Patches/POM-Changes.patch | 1 + init.sh | 11 ++++++++--- paperclip.sh | 6 +----- 6 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 6785057323..658890931d 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ Paperclip Paperclip.jar paperclip.jar paperclip-*.jar +paperclip.properties \ No newline at end of file diff --git a/Paperclip b/Paperclip index 9bb246f7f1..6bff72410e 160000 --- a/Paperclip +++ b/Paperclip @@ -1 +1 @@ -Subproject commit 9bb246f7f19963ef91e22af3e05a315ee5e5e746 +Subproject commit 6bff72410effad0b2b0b0d8471a477f42bd484ff diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index 990c7f7a69..2993e2f979 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -83,4 +83,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return this.a((ICommand) object); } +diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java ++++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java +@@ -0,0 +0,0 @@ public class ItemFactoryTest extends AbstractTestingBase { + + @Test + public void testKnownAttributes() throws Throwable { +- final ZipInputStream nmsZipStream = new ZipInputStream(CommandAbstract.class/* Magic class that isn't imported! */.getProtectionDomain().getCodeSource().getLocation().openStream()); ++ final ZipInputStream nmsZipStream = new ZipInputStream(net.minecraft.server.HttpUtilities.class/* Magic class that isn't imported! */.getProtectionDomain().getCodeSource().getLocation().openStream()); // Paper + final Collection names = new HashSet(); + for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) { + final String entryName = clazzEntry.getName(); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/POM-Changes.patch b/Spigot-Server-Patches/POM-Changes.patch index 1b8c680251..9f37b69645 100644 --- a/Spigot-Server-Patches/POM-Changes.patch +++ b/Spigot-Server-Patches/POM-Changes.patch @@ -58,6 +58,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ++ paper-${minecraft.version} + clean install diff --git a/init.sh b/init.sh index 1def2965d2..53f0ddad38 100755 --- a/init.sh +++ b/init.sh @@ -2,12 +2,17 @@ PS1="$" basedir=`pwd` -workdir=$basedir/work +workdir="$basedir/work" minecraftversion=$(cat BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) -decompiledir=$workdir/$minecraftversion -nms=$decompiledir/net/minecraft/server +decompiledir="$workdir/$minecraftversion" +nms="$decompiledir/net/minecraft/server" cb=src/main/java/net/minecraft/server +paperjar="$basedir/Paper-Server/target/paper-${minecraftversion}.jar" +vanillajar="${decompiledir}/${minecraftversion}.jar" + +echo -e "mcver=${minecraftversion}\npaperjar=${paperjar}\nvanillajar=${vanillajar}" > paperclip.properties + patch=$(which patch 2>/dev/null) if [ "x$patch" == "x" ]; then patch=$basedir/hctap.exe diff --git a/paperclip.sh b/paperclip.sh index e37164a70c..fe255bfa9b 100755 --- a/paperclip.sh +++ b/paperclip.sh @@ -2,13 +2,9 @@ basedir=`pwd` workdir=$basedir/work mcver=$(cat BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) -decompiledir="$workdir/$mcver" - -paperjar="$basedir/$(ls ./Paper-Server/target/paper*-SNAPSHOT.jar)" -vanillajar="${decompiledir}/${mcver}.jar" cd ./Paperclip -mvn clean package -Dmcver=${mcver} -Dpaperjar="${paperjar}" -Dvanillajar="${vanillajar}" +mvn clean package cd .. cp ./Paperclip/target/paperclip-${mcver}.jar ./paperclip.jar