mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 22:45:31 +01:00
[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.
This commit is contained in:
parent
2dddf8acbb
commit
ac12a97076
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue