1
0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-11-09 10:09:56 +01:00

Init & sync the mirror

This commit is contained in:
Pete Fotheringham 2024-09-02 13:03:30 +01:00
parent 0e99bf6486
commit d202e8ec05

@ -26,7 +26,7 @@
# - PARALLEL_JOBS
# - RETRY_FETCHES
# - handle local manifests
# - Sync mirror
# - Sync mirror if we're using one
# - Branch-specific stuff
# - main sync and build loop For each device in `$DEVICE_LIST`
# - setup build overlay
@ -133,3 +133,23 @@ if [ "$INCLUDE_PROPRIETARY" = true ]; then
/root/build_manifest.py --remote "https://gitlab.com" --remotename "gitlab_https" \
"https://gitlab.com/the-muppets/manifest/raw/$themuppets_branch/muppets.xml" .repo/local_manifests/proprietary_gitlab.xml
fi
# Sync mirror if we're using one
if [ "$LOCAL_MIRROR" = true ]; then
cd "$MIRROR_DIR"
if [ "$INIT_MIRROR" = true ]; then
if [ ! -d .repo ]; then
echo ">> [$(date)] Initializing mirror repository" | tee -a "$repo_log"
( yes||: ) | repo init -u https://github.com/LineageOS/mirror --mirror --no-clone-bundle -p linux --git-lfs &>> "$repo_log"
fi
else
echo ">> [$(date)] Initializing mirror repository disabled" | tee -a "$repo_log"
fi
if [ "$SYNC_MIRROR" = true ]; then
echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log"
repo sync "${jobs_arg[@]}" --force-sync --no-clone-bundle &>> "$repo_log"
else
echo ">> [$(date)] Sync mirror repository disabled" | tee -a "$repo_log"
fi
fi