From e6800ddf188b670ca3bb5659cfef47031cf1af79 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 3 Aug 2022 11:18:54 +0000 Subject: [PATCH 1/5] replace manifest with $REPO_CUSTOM_MANIFEST when available --- src/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/build.sh b/src/build.sh index f6e3cd7..459f135 100755 --- a/src/build.sh +++ b/src/build.sh @@ -104,6 +104,10 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then 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 -- GitLab From be891cdabd515fdcaf91b6f0620786e80bcf3098 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 3 Aug 2022 11:19:42 +0000 Subject: [PATCH 2/5] adding REPO_CUSTOM_MANIFEST variable definition --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index f0b19a1..7461559 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 + # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: # * begin.sh, run at the very beginning -- GitLab From e0e5d60d0ff980836d0a1c632244f650bd2a48bc Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 3 Aug 2022 11:56:51 +0000 Subject: [PATCH 3/5] restore old manifest before init --- src/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/build.sh b/src/build.sh index 459f135..59147e2 100755 --- a/src/build.sh +++ b/src/build.sh @@ -102,6 +102,11 @@ 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 -- GitLab From b245927ebf9d29fad1a61efb2e8c94fa4b26a569 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 3 Aug 2022 13:03:14 +0000 Subject: [PATCH 4/5] default REPO_CUSTOM_MANIFEST to false --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7461559..0e96372 100644 --- a/Dockerfile +++ b/Dockerfile @@ -116,7 +116,7 @@ ENV USE_LUNCH false ENV BUILD_FLASH_PACKAGE false # specify a custom manifest URL -ENV REPO_CUSTOM_MANIFEST +ENV REPO_CUSTOM_MANIFEST false # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: -- GitLab From 0d478adfa2297569a96ec7d5c91a355c74671d62 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Thu, 6 Oct 2022 15:10:18 +0000 Subject: [PATCH 5/5] Apply 1 suggestion(s) to 1 file(s) --- src/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index 59147e2..62745f8 100755 --- a/src/build.sh +++ b/src/build.sh @@ -105,7 +105,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then if [ -f ".repo/manifests/default.xml" ]; then cd .repo/manifests/ git checkout default.xml - cd ../../ + cd ../.. fi yes | repo init $REPO_INIT_PARAM -u "$REPO" -b "${TAG_PREFIX}${BRANCH_NAME}" -- GitLab