Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] add REPO_SYNC to disable repo sync #432

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ ENV DELETE_OLD_LOGS 0
# build type of your builds (user|userdebug|eng)
ENV BUILD_TYPE "userdebug"

# Sync Repository before starting build process
ENV REPO_SYNC true

# 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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ Other useful settings are:
* `PARALLEL_JOBS`: Limit the number of parallel jobs to run (`-j` for `repo sync` and `mka`).
By default, the build system should match the number of parallel jobs to the number of cpu
cores on your machine. Reducing this number can help keeping it responsive for other tasks.
* `REPO_SYNC (true)`: change this to `false` if you want to skip syncing repo
and build from the current state of the source tree.

The full list of settings, including the less interesting ones not mentioned in
this guide, can be found in the [Dockerfile][dockerfile].
Expand Down
8 changes: 4 additions & 4 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ if [ "$LOCAL_MIRROR" = true ]; then
"https://gitlab.com/the-muppets/manifest/raw/mirror/default.xml" .repo/local_manifests/proprietary_gitlab.xml
fi

echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log"
repo sync "${jobs_arg[@]}" --force-sync --no-clone-bundle &>> "$repo_log"
[ "$REPO_SYNC" != true ] || echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log"
[ "$REPO_SYNC" != true ] || repo sync "${jobs_arg[@]}" --force-sync --no-clone-bundle &>> "$repo_log"
fi

for branch in ${BRANCH_NAME//,/ }; do
Expand Down Expand Up @@ -186,9 +186,9 @@ for branch in ${BRANCH_NAME//,/ }; do
"https://gitlab.com/the-muppets/manifest/raw/$themuppets_branch/muppets.xml" .repo/local_manifests/proprietary_gitlab.xml
fi

echo ">> [$(date)] Syncing branch repository" | tee -a "$repo_log"
[ "$REPO_SYNC" != true ] || echo ">> [$(date)] Syncing branch repository" | tee -a "$repo_log"
builddate=$(date +%Y%m%d)
repo sync "${jobs_arg[@]}" -c --force-sync &>> "$repo_log"
[ "$REPO_SYNC" != true ] || repo sync "${jobs_arg[@]}" -c --force-sync &>> "$repo_log"

if [ ! -d "vendor/$vendor" ]; then
echo ">> [$(date)] Missing \"vendor/$vendor\", aborting"
Expand Down