diff --git a/Dockerfile b/Dockerfile index f0b19a1cb42cb4600a9168951f4bd90056e1dda2..0e963720daec12f9de0328e911e01267cf99f194 100644 --- a/Dockerfile +++ b/Dockerfile @@ -115,6 +115,9 @@ ENV USE_LUNCH false # Include flash binaries and script to the resulting img zip ENV BUILD_FLASH_PACKAGE false +# specify a custom manifest URL +ENV REPO_CUSTOM_MANIFEST false + # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: # * begin.sh, run at the very beginning diff --git a/src/build.sh b/src/build.sh index f6e3cd7075e1404ba3429bc23d6ce56561fdf028..62745f8cc7b896a30e40bc665dec66ca3cf21214 100755 --- a/src/build.sh +++ b/src/build.sh @@ -102,8 +102,17 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then if [ -n ${REPO_INIT_DEPTH} ] && [ ${REPO_INIT_DEPTH} -gt 0 ]; then REPO_INIT_PARAM="--depth ${REPO_INIT_DEPTH}" fi + if [ -f ".repo/manifests/default.xml" ]; then + cd .repo/manifests/ + git checkout default.xml + cd ../.. + fi yes | repo init $REPO_INIT_PARAM -u "$REPO" -b "${TAG_PREFIX}${BRANCH_NAME}" + if [ "$REPO_CUSTOM_MANIFEST" != false ]; then + wget -O .repo/manifests/default.xml $REPO_CUSTOM_MANIFEST + fi + # Copy local manifests to the appropriate folder in order take them into consideration echo ">> [$(date)] Copying '$LMANIFEST_DIR/*.xml' to '.repo/local_manifests/'" mkdir -p .repo/local_manifests