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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user