From 8c61f4a51cd70e4d3ddb1dfac22c08f710fecf64 Mon Sep 17 00:00:00 2001 From: YuruC3 Date: Wed, 2 Jul 2025 00:05:40 +0200 Subject: [PATCH] Edits for gitPush so that it works. Again. :( --- docker/gitPush.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docker/gitPush.sh b/docker/gitPush.sh index 96b1ca5..5b6d29d 100644 --- a/docker/gitPush.sh +++ b/docker/gitPush.sh @@ -12,6 +12,15 @@ if [ ! -d "$REPO_DIR/.git" ]; then fi cd "$REPO_DIR" + +# Abort previous rebase/cherry-pick if stuck +git rebase --abort 2>/dev/null || true +git cherry-pick --abort 2>/dev/null || true + +# Make sure we're on a clean 'main' +git checkout main || git checkout -b main origin/main +git pull --rebase --autostash + git remote set-url origin "https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}" @@ -25,7 +34,7 @@ git add MirrorListV4 MirrorListV6 OPNS_MirrorListV4 OPNS_MirrorListV6 if ! git diff --quiet --cached; then echo "[$(date)] Committing and pushing changes..." git commit -m "Auto-update mirror list on $(date -Iseconds)" - git pull --rebase --autostash + # git pull --rebase --autostash git push --quiet echo "[$(date)] Changes pushed." else