fix: build scripts use fetch+reset instead of pull to avoid ref lock errors
Some checks failed
Mirror to GitHub / mirror (push) Failing after 37s
Build Release Binaries / build-amd64 (push) Failing after 3m30s

git pull fails when refs are stale from concurrent builds. Switch to
git gc + git fetch + git reset --hard origin/branch for robustness.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-04-09 06:07:10 +04:00
parent 5d8e743cbf
commit c184d5e1f3
2 changed files with 6 additions and 2 deletions

View File

@@ -53,7 +53,9 @@ if [ "$DO_PULL" = "1" ]; then
cd "$BASE_DIR/data/source"
git reset --hard HEAD 2>/dev/null || true
git clean -fd 2>/dev/null || true
git pull origin feat/android-voip-client 2>&1 | tail -3
git gc --prune=now 2>/dev/null || true
git fetch origin feat/android-voip-client 2>&1 | tail -3
git reset --hard origin/feat/android-voip-client 2>/dev/null || true
fi
# Clean Rust if requested