9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00
This commit is contained in:
violetc
2021-10-30 19:42:38 +08:00
commit 014a532af5
34 changed files with 2608 additions and 0 deletions

25
scripts/paperclip.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copied from https://github.com/PaperMC/Paper/blob/d54ce6c17fb7a35238d6b9f734d30a4289886773/scripts/paperclip.sh
# License from Paper applies to this file
(
set -e
basedir="$(cd "$1" && pwd -P)"
workdir="$basedir/Paper/work"
mcver=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
paperjar="$basedir/Leaves-Server/target/leaves-$mcver.jar"
vanillajar="$workdir/Minecraft/$mcver/$mcver.jar"
(
cd "$workdir/Paperclip"
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$paperjar" "-Dvanillajar=$vanillajar"
)
cp "$workdir/Paperclip/assembly/target/paperclip-${mcver}.jar" "$basedir/leaves-paperclip.jar"
echo ""
echo ""
echo ""
echo "Build success!"
echo "Copied final jar to $(cd "$basedir" && pwd -P)/leaves-paperclip.jar"
) || exit 1