build minecraft commit before applying CraftBukkit

allows us to see what craft bukkit changed
This commit is contained in:
Aikar 2018-07-18 00:45:27 -04:00
parent f7a676930a
commit 87cdf6c201
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE

View File

@ -21,6 +21,17 @@ cd "$workdir/CraftBukkit"
$gitcmd checkout -B patched HEAD >/dev/null 2>&1 $gitcmd checkout -B patched HEAD >/dev/null 2>&1
rm -rf "$cb" rm -rf "$cb"
mkdir -p "$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 <auto@mated.null>"
# apply patches
for file in $(ls nms-patches) for file in $(ls nms-patches)
do do
patchFile="nms-patches/$file" patchFile="nms-patches/$file"
@ -31,11 +42,10 @@ do
sed -i 's/\r//' "$nms/$file" > /dev/null sed -i 's/\r//' "$nms/$file" > /dev/null
set -e set -e
cp "$nms/$file" "$cb/$file"
"$patch" -s -d src/main/java/ "net/minecraft/server/$file" < "$patchFile" "$patch" -s -d src/main/java/ "net/minecraft/server/$file" < "$patchFile"
done done
$gitcmd add src $gitcmd add src
$gitcmd commit -m "CraftBukkit $ $(date)" --author="Auto <auto@mated.null>" $gitcmd commit -m "CraftBukkit $ $(date)" --author="Auto <auto@mated.null>"
$gitcmd checkout -f HEAD^ $gitcmd checkout -f HEAD~2
) )