Base 1.13.2

This commit is contained in:
Sotr
2019-03-04 18:38:35 +08:00
parent cadd3f71c0
commit dc3c114449
21 changed files with 1148 additions and 1205 deletions

47
scripts/build.sh Normal file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env bash
(
set -e
basedir="$(cd "$1" && pwd -P)"
workdir="$basedir/work"
paperbasedir="$basedir/work/Paper"
paperworkdir="$basedir/work/Paper/work"
if [ "$2" == "--setup" ] || [ "$3" == "--setup" ] || [ "$4" == "--setup" ]; then
echo "[Akarin] Setup Paper.."
(
cd "$paperbasedir"
./paper patch
)
fi
echo "[Akarin] Ready to build"
(
cd "$paperbasedir"
echo "[Akarin] Touch sources.."
cd "$paperbasedir"
if [ "$2" == "--fast" ] || [ "$3" == "--fast" ] || [ "$4" == "--fast" ]; then
echo "[Akarin] Test has been skipped"
\cp -rf "$basedir/src" "$paperbasedir/Paper-Server/"
\cp -rf "$basedir/pom.xml" "$paperbasedir/Paper-Server/"
mvn clean install -DskipTests
else
rm -rf Paper-API/src
rm -rf Paper-Server/src
./paper patch
\cp -rf "$basedir/src" "$paperbasedir/Paper-Server/"
\cp -rf "$basedir/pom.xml" "$paperbasedir/Paper-Server/"
mvn clean install
fi
minecraftversion=$(cat "$paperworkdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
rawjar="$paperbasedir/Paper-Server/target/akarin-$minecraftversion.jar"
\cp -rf "$rawjar" "$basedir/akarin-$minecraftversion.jar"
echo ""
echo "[Akarin] Build successful"
echo "[Akarin] Migrated final jar to $basedir/akarin-$minecraftversion.jar"
)
)

13
scripts/inst.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
(
set -e
basedir="$(pwd -P)"
version="master"
(git submodule update --init --remote && cd "work/Paper" && git checkout "$version" && cd "$basedir" && chmod +x scripts/build.sh && ./scripts/build.sh "$basedir" "$1" "$2" "$3") || (
echo "Failed to build Akarin"
exit 1
) || exit 1
)

12
scripts/upstream.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
(
set -e
basedir="$(cd "$1" && pwd -P)"
(git submodule update --init --remote && git add . && git commit -m 'Upstream Paper') || (
echo "Failed to upstream"
exit 1
) || exit 1
)