From af3a3aed3f813279c809258740aac3e51acee6e6 Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Tue, 7 Apr 2020 14:39:16 +0200 Subject: [PATCH 1/4] Backup img --- Dockerfile | 3 +++ src/build.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index c5545f6..5c0ef66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,6 +79,9 @@ ENV ZIP_SUBDIR true # Write the verbose logs to $LOGS_DIR/$codename instead of $LOGS_DIR/ ENV LOGS_SUBDIR true +# Backup the .img in addition to zips +ENV BACKUP_IMG false + # Generate delta files ENV BUILD_DELTA false diff --git a/src/build.sh b/src/build.sh index ca6c7e5..69e0f75 100755 --- a/src/build.sh +++ b/src/build.sh @@ -223,6 +223,12 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then sha256sum "$build" > "$ZIP_DIR/$zipsubdir/$build.sha256sum" done find . -maxdepth 1 -name 'e-*.zip*' -type f -exec mv {} "$ZIP_DIR/$zipsubdir/" \; + + if [ "$BACKUP_IMG" = true ] ; then + #find out/target/product/ -maxdepth 2 -name '.img' -type f -exec cp {} "$ZIP_DIR/$zipsubdir/" \; + find out/target/product/ -maxdepth 2 -name '.img' -type f + fi + cd "$source_dir" build_successful=true else -- GitLab From 015c39aea1722e8a1180666426269d56e9869228 Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Wed, 8 Apr 2020 15:21:08 +0200 Subject: [PATCH 2/4] Try to see all .img --- src/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index 69e0f75..ff5d73b 100755 --- a/src/build.sh +++ b/src/build.sh @@ -224,9 +224,10 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then done find . -maxdepth 1 -name 'e-*.zip*' -type f -exec mv {} "$ZIP_DIR/$zipsubdir/" \; + cd .. if [ "$BACKUP_IMG" = true ] ; then #find out/target/product/ -maxdepth 2 -name '.img' -type f -exec cp {} "$ZIP_DIR/$zipsubdir/" \; - find out/target/product/ -maxdepth 2 -name '.img' -type f + find . -maxdepth 2 -name '.img' -type f fi cd "$source_dir" -- GitLab From 40a2285c30b4746fa0bf4ee758662e8d6e670b63 Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Wed, 8 Apr 2020 15:53:04 +0200 Subject: [PATCH 3/4] new test --- src/build.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index ff5d73b..184606a 100755 --- a/src/build.sh +++ b/src/build.sh @@ -225,7 +225,20 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then find . -maxdepth 1 -name 'e-*.zip*' -type f -exec mv {} "$ZIP_DIR/$zipsubdir/" \; cd .. - if [ "$BACKUP_IMG" = true ] ; then + + echo "== $source_dir/out/target/product/" + ls $source_dir/out/target/product/ + + echo "== $source_dir/out/target/product/FP3" + ls $source_dir/out/target/product/FP3 + + echo "== $source_dir/out/target/product/msm8953_64" + ls $source_dir/out/target/product/msm8953_64 + + echo "== find" + find . -maxdepth 2 -name '.img' -type f + + if [ "$BACKUP_IMG" = true ]; then #find out/target/product/ -maxdepth 2 -name '.img' -type f -exec cp {} "$ZIP_DIR/$zipsubdir/" \; find . -maxdepth 2 -name '.img' -type f fi -- GitLab From 07d278d21f5f2c63972cc291e61a6908a82e3954 Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Wed, 8 Apr 2020 16:11:53 +0200 Subject: [PATCH 4/4] Final configuration --- src/build.sh | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/build.sh b/src/build.sh index 184606a..69a7c48 100755 --- a/src/build.sh +++ b/src/build.sh @@ -224,23 +224,8 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then done find . -maxdepth 1 -name 'e-*.zip*' -type f -exec mv {} "$ZIP_DIR/$zipsubdir/" \; - cd .. - - echo "== $source_dir/out/target/product/" - ls $source_dir/out/target/product/ - - echo "== $source_dir/out/target/product/FP3" - ls $source_dir/out/target/product/FP3 - - echo "== $source_dir/out/target/product/msm8953_64" - ls $source_dir/out/target/product/msm8953_64 - - echo "== find" - find . -maxdepth 2 -name '.img' -type f - if [ "$BACKUP_IMG" = true ]; then - #find out/target/product/ -maxdepth 2 -name '.img' -type f -exec cp {} "$ZIP_DIR/$zipsubdir/" \; - find . -maxdepth 2 -name '.img' -type f + find . -maxdepth 1 -name '*.img' -type f -exec cp {} "$ZIP_DIR/$zipsubdir/" \; fi cd "$source_dir" -- GitLab