Add an option to clobber after every run

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2022-01-24 18:01:21 -05:00
parent 58b53de17a
commit 51003bff5a
3 changed files with 4 additions and 2 deletions

View File

@ -302,6 +302,8 @@ processRelease() {
done;
fi;
pkill java && sleep 10; #XXX: ugly hack
#Copy to archive
if [ "$DOS_AUTO_ARCHIVE_BUILDS" = true ]; then
echo -e "\e[0;32mCopying files to archive\e[0m";
@ -325,6 +327,7 @@ processRelease() {
echo -e "\e[0;32mRemoving to reclaim space\e[0m";
#TODO: add a sanity check
rm -rf "$OUT_DIR";
if [ "$DOS_REMOVE_AFTER_FULL" = true ]; then rm -rf "$DOS_BUILD_BASE/out"; fi; #clobber entire workspace
fi;
fi;

View File

@ -37,7 +37,6 @@ scanWorkspaceForMalware() {
export -f scanWorkspaceForMalware;
buildDevice() {
pkill java && sleep 10; #XXX: ugly hack
cd "$DOS_BUILD_BASE";
export OTA_KEY_OVERRIDE_DIR="$DOS_SIGNING_KEYS/$1";
breakfast "lineage_$1-user" && mka target-files-package otatools && processRelease $1 true $2;
@ -45,7 +44,6 @@ buildDevice() {
export -f buildDevice;
buildDeviceUserDebug() {
pkill java && sleep 10; #XXX: ugly hack
cd "$DOS_BUILD_BASE";
export OTA_KEY_OVERRIDE_DIR="$DOS_SIGNING_KEYS/$1";
breakfast "lineage_$1-userdebug" && mka target-files-package otatools && processRelease $1 true $2;

View File

@ -83,6 +83,7 @@ export DOS_GENERATE_DELTAS=true; #Creates deltas from existing target_files in $
export DOS_GENERATE_DELTAS_DEVICES=('akari' 'alioth' 'Amber' 'aura' 'aurora' 'avicii' 'blueline' 'bonito' 'bramble' 'cheryl' 'coral' 'crosshatch' 'davinci' 'discovery' 'enchilada' 'fajita' 'flame' 'FP3' 'guacamole' 'guacamoleb' 'marlin' 'mata' 'pioneer' 'pro1' 'redfin' 'sailfish' 'sargo' 'sunfish' 'taimen' 'vayu' 'voyager' 'walleye' 'xz2c'); #List of devices deltas will be generated for
export DOS_AUTO_ARCHIVE_BUILDS=true; #Copies files to $DOS_BUILDS after signing
export DOS_REMOVE_AFTER=true; #Removes device OUT directory after complete to reclaim space. Requires AUTO_ARCHIVE_BUILDS=true
export DOS_REMOVE_AFTER_FULL=false; #Removes the entire OUT directory
export DOS_GPG_SIGNING=true;
export DOS_GPG_SIGNING_KEY="B8744D67F9F1E14E145DFD8E7F627E920F316994";