From ac12a97076d6244bdee577d8c6f98e27b85c148a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 11 Aug 2018 13:42:15 -0400 Subject: [PATCH] [CI-SKIP] If mc-dev src folder exists, rebuild it on apply This ensures your local copy of this folder is up to date whenever mcdev imports change on the project. Before, as we/upstream add/remove's imports, your local folder could be out of sync and you have to randomly check 'do i need to run this?' This will just automate it. For those people who don't use this folder (not sure why you don't!), it won't change anything. --- scripts/applyPatches.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh index 1b0f5666f..2c02b8234 100755 --- a/scripts/applyPatches.sh +++ b/scripts/applyPatches.sh @@ -4,6 +4,7 @@ PS1="$" basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" +minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) gitcmd="git -c commit.gpgsign=false" applycmd="$gitcmd am --3way --ignore-whitespace" # Windows detection to workaround ARG_MAX limitation @@ -91,6 +92,11 @@ cd "$basedir" ( applyPatch "work/Spigot/Spigot-API" Paper-API HEAD && applyPatch "work/Spigot/Spigot-Server" Paper-Server HEAD + + # if we have previously ran ./paper mcdev, update it + if [ -d "$workdir/Minecraft/$minecraftversion/src" ]; then + $basedir/scripts/makemcdevsrc.sh $basedir + fi ) || ( echo "Failed to apply Paper Patches" exit 1