From 49f584a14b3481c1a2146b8cd6c7b5ea07544776 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 2 Oct 2018 21:44:03 -0400 Subject: [PATCH] [CI-SKIP] Update test server rebuild logic Many times I've ran paper test trying to SHUTDOWN the existing test server, only for it to see that my target folder is missing (for whatever reason), and it try to build paper to make the jar exists. Well, the patch process will wipe out any uncommitted changes, causing loss of work. Now we will only build patches if your missing your entire Paper-Server folder, and only trigger a mvn compile if the jar is missing. --- scripts/testServer.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/testServer.sh b/scripts/testServer.sh index 6931fff822..0c5a5eb506 100755 --- a/scripts/testServer.sh +++ b/scripts/testServer.sh @@ -63,17 +63,24 @@ fi # JAR CHECK # -jar="$basedir/Paper-Server/target/paper-${minecraftversion}.jar" +folder="$basedir/Paper-Server" +jar="$folder/target/paper-${minecraftversion}.jar" +if [ ! -d "$folder" ]; then +( + echo "Building Patched Repo" + cd "$basedir" + ./paper patch +) +fi + if [ ! -f "$jar" ] || [ "$2" == "build" ] || [ "$3" == "build" ]; then ( echo "Building Paper" cd "$basedir" - ./paper patch - mvn clean install + mvn package ) fi - # # JVM FLAGS #