diff --git a/Dockerfile b/Dockerfile index 93b5a9f..1e2c601 100644 --- a/Dockerfile +++ b/Dockerfile @@ -113,6 +113,9 @@ ENV DELETE_OLD_LOGS 0 # build type of your builds (user|userdebug|eng) ENV BUILD_TYPE "userdebug" +# we can use --depth=1 here +ENV REPO_INIT_ARGS "" + # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: # * begin.sh, run at the very beginning # * before.sh, run after the syncing and patching, before starting the builds diff --git a/src/build.sh b/src/build.sh index 611b2ba..19d3580 100755 --- a/src/build.sh +++ b/src/build.sh @@ -73,7 +73,7 @@ if [ "$LOCAL_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" + ( yes||: ) | repo init "$REPO_INIT_ARGS" -u https://github.com/LineageOS/mirror --mirror --no-clone-bundle -p linux --git-lfs &>> "$repo_log" fi # Copy local manifests to the appropriate folder in order take them into consideration @@ -169,9 +169,9 @@ for branch in ${BRANCH_NAME//,/ }; do echo ">> [$(date)] (Re)initializing branch repository" | tee -a "$repo_log" if [ "$LOCAL_MIRROR" = true ]; then - ( yes||: ) | repo init -u https://github.com/LineageOS/android.git --reference "$MIRROR_DIR" -b "$branch" --git-lfs &>> "$repo_log" + ( yes||: ) | repo init "$REPO_INIT_ARGS" -u https://github.com/LineageOS/android.git --reference "$MIRROR_DIR" -b "$branch" --git-lfs &>> "$repo_log" else - ( yes||: ) | repo init -u https://github.com/LineageOS/android.git -b "$branch" --git-lfs &>> "$repo_log" + ( yes||: ) | repo init "$REPO_INIT_ARGS" -u https://github.com/LineageOS/android.git -b "$branch" --git-lfs &>> "$repo_log" fi # Copy local manifests to the appropriate folder in order take them into consideration