From 87cdf6c201ced54a6073d5fc1588100ccd9aaa63 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 18 Jul 2018 00:45:27 -0400 Subject: [PATCH] build minecraft commit before applying CraftBukkit allows us to see what craft bukkit changed --- scripts/init.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index 3ef481b86..2b75ec894 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -21,6 +21,17 @@ cd "$workdir/CraftBukkit" $gitcmd checkout -B patched HEAD >/dev/null 2>&1 rm -rf "$cb" mkdir -p "$cb" +# create baseline NMS import so we can see diff of what CB changed +for file in $(ls nms-patches) +do + patchFile="nms-patches/$file" + file="$(echo "$file" | cut -d. -f1).java" + cp "$nms/$file" "$cb/$file" +done +$gitcmd add src +$gitcmd commit -m "Minecraft $ $(date)" --author="Auto " + +# apply patches for file in $(ls nms-patches) do patchFile="nms-patches/$file" @@ -31,11 +42,10 @@ do sed -i 's/\r//' "$nms/$file" > /dev/null set -e - cp "$nms/$file" "$cb/$file" "$patch" -s -d src/main/java/ "net/minecraft/server/$file" < "$patchFile" done $gitcmd add src $gitcmd commit -m "CraftBukkit $ $(date)" --author="Auto " -$gitcmd checkout -f HEAD^ +$gitcmd checkout -f HEAD~2 )