Skip to content

Commit

Permalink
Upgrade velocity; use git submodules instead of ad-hoc script
Browse files Browse the repository at this point in the history
  • Loading branch information
diogotcorreia committed Jan 24, 2024
1 parent acba865 commit 36b8482
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Velocity/
.direnv
.envrc
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "Velocity"]
path = Velocity
url = https://github.com/PaperMC/Velocity.git
shallow = true
1 change: 1 addition & 0 deletions Velocity
Submodule Velocity added at b9b116
15 changes: 6 additions & 9 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 36b8482

Please sign in to comment.