Update export pack script

- Remove redundant ssh clone mode
- Only clone the used branch
- Specify cloning the main branch
This commit is contained in:
Sergeant Acoustic 2026-02-20 16:45:30 +00:00
parent 1558ca8d00
commit 6d849075e3

View file

@ -9,17 +9,8 @@ if [ ! -d deps ]; then
mkdir deps
fi;
# If the user provides input e.g. `./export-pack.sh 1`, clone the repository using https
if [ -n "$1" ]; then
repo_prefix="https://patience.nearmisses.xyz/"
else
repo_prefix="forgejo@patience.nearmisses.xyz:"
fi
mod_repo="$repo_prefix/patience/mc_rebalance.git"
# Clone the repos if they exist, otherwise, update them
git clone "$mod_repo" "$basedir/deps/mc_rebalance" || (cd "$basedir/deps/mc_rebalance"; git pull) || exit 1
# Clone the mod repo, if it already exists then update it
git clone --single-branch -b main "https://patience.nearmisses.xyz/patience/mc_rebalance.git" "$basedir/deps/mc_rebalance" || (cd "$basedir/deps/mc_rebalance"; git pull) || exit 1
rm "$basedir/deps/mc_rebalance/build/libs/mc_rebalance-"*".jar"
(cd "$basedir"/deps/mc_rebalance/ && ./gradlew build)