1
0
mirror of git://f0xx.org/ac/ac-scripts synced 2026-08-09 20:59:09 +03:00

Fix isolated builder: standalone mobile clone for Docker git checkout.

Submodule gitfile paths break when only ac-mobile-android is mounted as
/workspace; clone the mobile repo directly instead of submodule init.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-09 18:58:24 +02:00
parent 242f73d37a
commit 5a7b0c91d8
2 changed files with 36 additions and 8 deletions

View File

@@ -33,10 +33,21 @@ echo "==> Phase: init build_id=${BUILD_ID} channel=${OTA_CHANNEL}"
if [[ -n "${GIT_REF:-}" ]]; then
echo "==> Phase: git checkout ${GIT_REF}"
git fetch --all --tags 2>/dev/null || true
git checkout --force "$GIT_REF"
current_head="$(git rev-parse HEAD 2>/dev/null || echo "")"
target_head=""
if [[ -n "${GIT_SHA:-}" ]]; then
git reset --hard "$GIT_SHA"
target_head="$(git rev-parse "${GIT_SHA}" 2>/dev/null || echo "")"
else
target_head="$(git rev-parse "${GIT_REF}" 2>/dev/null || echo "")"
fi
if [[ -n "$current_head" && -n "$target_head" && "$current_head" == "$target_head" ]]; then
echo "==> already at ${current_head:0:12}"
else
git fetch --all --tags 2>/dev/null || true
git checkout --force "$GIT_REF"
if [[ -n "${GIT_SHA:-}" ]]; then
git reset --hard "$GIT_SHA"
fi
fi
fi