blob: d2b8592c9d47c2c3da76cfee9d9e8776e9da3e00 [file] [log] [blame]
Alex Buynytskyy307d9bc2023-04-06 14:14:34 -07001#!/bin/bash
2# Script to perform a 2nd step of Android Finalization: REL finalization, create CLs and upload to Gerrit.
3
Alex Buynytskyyd98c43c2023-04-11 16:47:35 +00004# WIP, does not work yet
5exit 10
6
7set -ex
8
Alex Buynytskyy307d9bc2023-04-06 14:14:34 -07009function update_step_2_changes() {
10 set +e
11 repo forall -c '\
12 if [[ $(git status --short) ]]; then
13 git stash -u ;
14 repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization-Rel" ;
15 git stash pop ;
16 git add -A . ;
17 git commit --amend --no-edit ;
18 repo upload --cbr --no-verify -o nokeycheck -t -y . ;
19 fi'
20}
21
22function update_step_2_main() {
23 local top="$(dirname "$0")"/../../../..
24 source $top/build/make/tools/finalization/environment.sh
25
26 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
27
28 # prebuilts etc
29 source $top/build/make/tools/finalization/finalize-sdk-rel.sh
30
31 # move all changes to finalization branch/topic and upload to gerrit
32 update_step_2_changes
33
34 # build to confirm everything is OK
35 AIDL_FROZEN_REL=true $m
36}
37
38update_step_2_main