diff --git a/Dockerfile b/Dockerfile index c5545f6f5b4d49ed71b39367c8f763d0c77ce614..5c0ef66ffaa0630ad613b5a7ba0b2e39eede51de 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 ca6c7e5856e058af59c36e837d2cb79859a7f80c..69a7c486c5e37f77179f851d262e60c1b52a1ebf 100755 --- a/src/build.sh +++ b/src/build.sh @@ -223,6 +223,11 @@ 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 . -maxdepth 1 -name '*.img' -type f -exec cp {} "$ZIP_DIR/$zipsubdir/" \; + fi + cd "$source_dir" build_successful=true else