mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Rebuild patches after we continue from a paper edit.
This commit is contained in:
parent
526469fd23
commit
aeea23a135
11 changed files with 44 additions and 35 deletions
50
paper
50
paper
|
@ -49,29 +49,37 @@ case "$1" in
|
||||||
cd "$basedir"
|
cd "$basedir"
|
||||||
;;
|
;;
|
||||||
"e" | "edit")
|
"e" | "edit")
|
||||||
if [[ "$2" = "server" ]] ; then
|
case "$2" in
|
||||||
cd "$basedir/Paper-Server"
|
"server")
|
||||||
export LAST_EDIT=$(pwd)
|
cd "$basedir/Paper-Server"
|
||||||
|
export LAST_EDIT=$(pwd)
|
||||||
|
|
||||||
paperstash
|
paperstash
|
||||||
git rebase -i upstream/upstream
|
git rebase -i upstream/upstream
|
||||||
paperunstash
|
paperunstash
|
||||||
elif [[ "$2" = "api" ]] ; then
|
;;
|
||||||
cd "$basedir/Paper-API"
|
"api")
|
||||||
export LAST_EDIT=$(pwd)
|
cd "$basedir/Paper-API"
|
||||||
|
export LAST_EDIT=$(pwd)
|
||||||
|
|
||||||
paperstash
|
paperstash
|
||||||
git rebase -i upstream/upstream
|
git rebase -i upstream/upstream
|
||||||
paperunstash
|
paperunstash
|
||||||
elif [[ "$2" = "continue" ]] ; then
|
;;
|
||||||
cd "$LAST_EDIT"
|
"continue")
|
||||||
git add .
|
cd "$LAST_EDIT"
|
||||||
git rebase --continue
|
git add .
|
||||||
unset LAST_EDIT
|
git rebase --continue
|
||||||
scripts/rebuildPatches.sh "$basedir"
|
unset LAST_EDIT
|
||||||
else
|
(
|
||||||
echo "You must edit either the api or server."
|
cd "$basedir"
|
||||||
fi
|
scripts/rebuildPatches.sh "$basedir"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "You must edit either the api or server."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
"setup")
|
"setup")
|
||||||
if [[ -f ~/.bashrc ]] ; then
|
if [[ -f ~/.bashrc ]] ; then
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PS1="$"
|
PS1="$"
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
echo "Rebuilding Forked projects.... "
|
echo "Rebuilding Forked projects.... "
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
|
|
||||||
(git submodule update --init && ./scripts/remap.sh "$basedir" && ./scripts/decompile.sh "$basedir" && ./scripts/init.sh "$basedir" && ./scripts/applyPatches.sh "$basedir") || (
|
(git submodule update --init && ./scripts/remap.sh "$basedir" && ./scripts/decompile.sh "$basedir" && ./scripts/init.sh "$basedir" && ./scripts/applyPatches.sh "$basedir") || (
|
||||||
echo "Failed to build Paper"
|
echo "Failed to build Paper"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PS1="$"
|
PS1="$"
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
decompiledir="$workdir/$minecraftversion"
|
decompiledir="$workdir/$minecraftversion"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
nms="net/minecraft/server"
|
nms="net/minecraft/server"
|
||||||
export MODLOG=""
|
export MODLOG=""
|
||||||
PS1="$"
|
PS1="$"
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
|
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PS1="$"
|
PS1="$"
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
decompiledir="$workdir/$minecraftversion"
|
decompiledir="$workdir/$minecraftversion"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
PS1="$"
|
PS1="$"
|
||||||
|
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$basedir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$basedir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
decompiledir="$workdir/$minecraftversion"
|
decompiledir="$workdir/$minecraftversion"
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
mcver=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
mcver=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
paperjar="../../Paper-Server/target/paper-$mcver.jar"
|
paperjar="../../Paper-Server/target/paper-$mcver.jar"
|
||||||
vanillajar="../$mcver/$mcver.jar"
|
vanillajar="../$mcver/$mcver.jar"
|
||||||
|
|
||||||
cd "$workdir/Paperclip"
|
(
|
||||||
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$paperjar" "-Dvanillajar=$vanillajar" || exit 1
|
cd "$workdir/Paperclip"
|
||||||
cd ..
|
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$paperjar" "-Dvanillajar=$vanillajar" || exit 1
|
||||||
|
)
|
||||||
cp "$workdir/Paperclip/target/paperclip-${mcver}.jar" "$basedir/paperclip.jar"
|
cp "$workdir/Paperclip/target/paperclip-${mcver}.jar" "$basedir/paperclip.jar"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Build success!"
|
echo "Build success!"
|
||||||
echo "Copied final jar to $basedir/paperclip.jar"
|
echo "Copied final jar to "$(realpath "$basedir/paperclip.jar")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PS1="$"
|
PS1="$"
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
echo "Rebuilding patch files from current fork state..."
|
echo "Rebuilding patch files from current fork state..."
|
||||||
git config core.safecrlf false
|
git config core.safecrlf false
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PS1="$"
|
PS1="$"
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat ${workdir}/BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat ${workdir}/BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
minecrafthash=$(cat ${workdir}/BuildData/info.json | grep minecraftHash | cut -d '"' -f 4)
|
minecrafthash=$(cat ${workdir}/BuildData/info.json | grep minecraftHash | cut -d '"' -f 4)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PS1="$"
|
PS1="$"
|
||||||
basedir="$1"
|
basedir=$(realpath "$1")
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
|
|
||||||
function update {
|
function update {
|
||||||
|
|
Loading…
Reference in a new issue