From ea927b73453314dfa6ab7e35505460512a944ff7 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Fri, 9 Oct 2020 09:03:07 +0000 Subject: [PATCH 1/5] add eng type --- src/build.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index 24bb23d..e878ccb 100755 --- a/src/build.sh +++ b/src/build.sh @@ -197,7 +197,14 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then echo "ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}" echo "Switch to Python2" ln -fs /usr/bin/python2 /usr/bin/python - if brunch ${DEVICE}; then + + BRUNCH_DEVICE=${DEVICE} + + if [ "${ENG_BUILD}" = true ]; then + BRUNCH_DEVICE=${DEVICE}-eng + fi + + if brunch ${BRUNCH_DEVICE}; then currentdate=$(date +%Y%m%d) if [ "$builddate" != "$currentdate" ]; then find out/target/product/${DEVICE} -maxdepth 1 -name "e-*-$currentdate-*.zip*" -type f -exec sh /root/fix_build_date.sh {} $currentdate $builddate \; -- GitLab From ad7603c39ace4a8ce5f6d9f4fdf6002c8de1a35d Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Fri, 9 Oct 2020 11:11:46 +0000 Subject: [PATCH 2/5] adding lineage_ prefix --- src/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index e878ccb..f044825 100755 --- a/src/build.sh +++ b/src/build.sh @@ -201,7 +201,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then BRUNCH_DEVICE=${DEVICE} if [ "${ENG_BUILD}" = true ]; then - BRUNCH_DEVICE=${DEVICE}-eng + BRUNCH_DEVICE=lineage_${DEVICE}-eng fi if brunch ${BRUNCH_DEVICE}; then -- GitLab From 3f997a14791e194ac637fda3f1f8b2ca594686b7 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 21 Oct 2020 07:31:28 +0000 Subject: [PATCH 3/5] Update Dockerfile to add ENG_BUILD --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index d213ba2..617990f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -96,6 +96,10 @@ ENV RECOVERY_IMG false # Ship with Minimal Apps ENV MINIMAL_APPS false +# Force an eng build even when device name doesn't contain -eng +ENV ENG_BUILD false + + # 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 -- GitLab From f1fdd8eb2526d21808432122acd243e54f19a98a Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 21 Oct 2020 07:31:53 +0000 Subject: [PATCH 4/5] Update Dockerfile.community to add ENG_BUILD --- Dockerfile.community | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile.community b/Dockerfile.community index 8ec19d6..1444d9c 100644 --- a/Dockerfile.community +++ b/Dockerfile.community @@ -105,6 +105,10 @@ ENV DELETE_OLD_ZIPS 0 # Delete old logs in $LOGS_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_LOGS 0 +# Force an eng build even when device name doesn't contain -eng +ENV ENG_BUILD false + + # 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 -- GitLab From 35520fb83cf4748f944eca14a02945fd41f1688d Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Wed, 21 Oct 2020 09:45:11 +0200 Subject: [PATCH 5/5] Import for community image --- build-community.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build-community.sh b/build-community.sh index 567720d..32c0bf9 100755 --- a/build-community.sh +++ b/build-community.sh @@ -289,7 +289,15 @@ for branch in ${BRANCH_NAME//,/ }; do echo "ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}" echo "Switch to Python2" ln -fs /usr/bin/python2 /usr/bin/python - if brunch $codename &>> "$DEBUG_LOG"; then + + + BRUNCH_DEVICE=${codename} + + if [ "${ENG_BUILD}" = true ]; then + BRUNCH_DEVICE=lineage_${codename}-eng + fi + + if brunch ${BRUNCH_DEVICE} &>> "$DEBUG_LOG"; then currentdate=$(date +%Y%m%d) if [ "$builddate" != "$currentdate" ]; then find out/target/product/$codename -maxdepth 1 -name "e-*-$currentdate-*.zip*" -type f -exec sh /root/fix_build_date.sh {} $currentdate $builddate \; &>> "$DEBUG_LOG" -- GitLab