Refactor finalization scripts.

Bug: 264308911
Test: run locally
Change-Id: I60fa1e1121fafb617d8508403fae07f0bdf39e66
This commit is contained in:
Alex Buynytskyy
2023-02-09 22:40:53 +00:00
parent 6698f2f688
commit afddc07570
8 changed files with 258 additions and 0 deletions

21
tools/finalization/cleanup.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Brings local repository to a remote head state.
# set -ex
function finalize_revert_local_changes_main() {
local top="$(dirname "$0")"/../../../..
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
# remove the out folder
$m clobber
repo selfupdate
repo forall -c '\
git checkout . ; git revert --abort ; git clean -fdx ;\
git checkout @ ; git branch fina-step1 -D ; git reset --hard; \
repo start fina-step1 ; git checkout @ ; git b fina-step1 -D ;'
}
finalize_revert_local_changes_main