diff --git a/src/build.sh b/src/build.sh index a146e8c4a98c5238f04d5ab8f0f5a1b7d98135e7..cb9ff8d8cfd55abdf3682f2bfde5a714e69d3035 100755 --- a/src/build.sh +++ b/src/build.sh @@ -243,10 +243,6 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then echo ">> [$(date)] Moving build artifacts for ${DEVICE} to '$ZIP_DIR/$zipsubdir'" cd "${OUT}" || return 1 for build in $(ls e-*.zip); do - #with only systemimage, we don't have a e-*.zip - if [ "${BUILD_ONLY_SYSTEMIMAGE}" = true ]; then - build=e-`grep lineage.version system/build.prop | sed s/#.*// | sed s/.*=// | tr -d \\n`.zip - fi sha256sum "$build" > "$ZIP_DIR/$zipsubdir/$build.sha256sum" find . -maxdepth 1 -name 'e-*.zip*' -type f -exec mv {} "$ZIP_DIR/$zipsubdir/" \; @@ -286,6 +282,19 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then fi done + #with only systemimage, we don't have a e-*.zip + if [ "${BUILD_ONLY_SYSTEMIMAGE}" = true ]; then + build=e-`grep lineage.version system/build.prop | sed s/#.*// | sed s/.*=// | tr -d \\n`.zip + if [ "$BACKUP_INTERMEDIATE_SYSTEM_IMG" = true ]; then + mv obj/PACKAGING/target_files_intermediates/lineage*/IMAGES/system.img ./ + zip "$ZIP_DIR/$zipsubdir/IMG-$build" system.img + cd $ZIP_DIR/$zipsubdir + sha256sum "IMG-$build" > "IMG-$build.sha256sum" + md5sum "IMG-$build" > "IMG-$build.md5sum" + cd "${OUT}" || return 1 + fi + fi + if [ "$IS_EMULATOR" = true -a "$BACKUP_EMULATOR" = true ]; then EMULATOR_ARCHIVE="e-android$android_version-eng-$currentdate-linux-x86-img.zip" mv ../../../host/linux-x86/sdk_addon/*-img.zip "$ZIP_DIR/$zipsubdir/$EMULATOR_ARCHIVE"