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

Make init mirror switchable

This commit is contained in:
Pete 2023-12-04 12:10:49 +00:00 committed by Pete Fotheringham
parent 4daef36941
commit 34091c5216

@ -76,15 +76,18 @@ if [ -n "${RETRY_FETCHES-}" ]; then
fi fi
fi fi
if [ "$LOCAL_MIRROR" = true ]; then if [ "$LOCAL_MIRROR" = true ]; then
cd "$MIRROR_DIR" cd "$MIRROR_DIR"
if [ "$INIT_MIRROR" = true ]; then
if [ ! -d .repo ]; then if [ ! -d .repo ]; then
echo ">> [$(date)] Initializing mirror repository" | tee -a "$repo_log" 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" ( 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 fi
fi
# Copy local manifests to the appropriate folder in order take them into consideration # Copy local manifests to the appropriate folder in order take them into consideration
echo ">> [$(date)] Copying '$LMANIFEST_DIR/*.xml' to '.repo/local_manifests/'" echo ">> [$(date)] Copying '$LMANIFEST_DIR/*.xml' to '.repo/local_manifests/'"
@ -449,7 +452,6 @@ for branch in ${BRANCH_NAME//,/ }; do
fi fi
done done
fi fi
done done