Add support for paperclip (purpurclip)

This commit is contained in:
William Blake Galbreath
2020-01-29 22:38:13 -06:00
parent ddf1f8a586
commit 6f2561d7d3
3 changed files with 34 additions and 0 deletions

1
.gitignore vendored
View File

@@ -45,3 +45,4 @@ docs/build/
Purpur-Server
Purpur-API
mc-dev
purpurclip.jar

11
purpur
View File

@@ -56,6 +56,17 @@ case "$1" in
mvn -e clean install && cd ../${FORK_NAME}-Server && mvn -e clean install
)
;;
"jar" | "purpurclip")
(
basedir
cd "$basedir"
if [ "$2" != "fast" ]; then
scripts/upstream.sh
fi
./scripts/apply.sh "$basedir"
./scripts/purpurclip.sh
)
;;
"d" | "de" | "deploy")
(
basedir

22
scripts/purpurclip.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
(
set -e
basedir="$(cd "$1" && pwd -P)"
workdir="$basedir/Paper/work"
mcver=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
purpurjar="$basedir/Purpur-Server/target/purpur-$mcver.jar"
vanillajar="$workdir/Minecraft/$mcver/$mcver.jar"
(
cd "$workdir/Paperclip"
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$purpurjar" "-Dvanillajar=$vanillajar"
)
cp "$workdir/Paperclip/assembly/target/paperclip-${mcver}.jar" "$basedir/purpurclip.jar"
echo ""
echo ""
echo ""
echo "Build success!"
echo "Copied final jar to $(cd "$basedir" && pwd -P)/purpurclip.jar"
) || exit 1