blob: ddaffae44c2f20dd0c115c1e6eb087b7c76beeec [file] [log] [blame]
Alex Buynytskyy10411ee2024-03-15 03:14:14 +00001#!/bin/bash
2# Brings local repository to a remote head state. Also removes all dryrun branches.
3
4# set -ex
5
6function finalize_revert_local_changes_main() {
7 local top="$(dirname "$0")"/../../../..
8 source $top/build/make/tools/finalization/environment.sh
9
10 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
11
12 # remove the out folder
13 $m clobber
14
15 repo selfupdate
16
17 repo forall -c '\
18 git checkout . ; git revert --abort ; git clean -fdx ;\
19 git checkout @ --detach ; git branch fina-step1 -D ; git reset --hard; \
20 repo start fina-step1 ; git checkout @ --detach ; git b fina-step1 -D ; \
21 git b $FINAL_PLATFORM_CODENAME-SDK-Finalization-DryRun -D; \
22 git b $FINAL_PLATFORM_CODENAME-SDK-Finalization-DryRun-Rel -D; '
23}
24
25finalize_revert_local_changes_main