diff --git a/.gitignore b/.gitignore index db33d07..f3bf9c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -Velocity/ +.direnv +.envrc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5845c0f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "Velocity"] + path = Velocity + url = https://github.com/PaperMC/Velocity.git + shallow = true diff --git a/Velocity b/Velocity new file mode 160000 index 0000000..b9b1166 --- /dev/null +++ b/Velocity @@ -0,0 +1 @@ +Subproject commit b9b11665b9a3926bdbf45986e6e0f736ca0d01cd diff --git a/publish.sh b/publish.sh index f895d67..104f290 100755 --- a/publish.sh +++ b/publish.sh @@ -1,17 +1,14 @@ #! /usr/bin/env bash - -if [ ! -d "Velocity" ]; -then - git clone https://github.com/PaperMC/Velocity.git -fi +set -e cd Velocity -git restore . -git pull -git clean -fd for patch in ../patches/*.patch; do - git apply $patch || exit + git apply $patch done ./gradlew publish + +ls ../patches/*.patch | tac | while read f; do + git apply -R $patch +done