blob: fd07b7b22ac01679594880f075963a17c7acfc39 [file] [log] [blame]
Alex Buynytskyy307d9bc2023-04-06 14:14:34 -07001#!/bin/bash
2# Script to perform a 1st step of Android Finalization: API/SDK finalization, update CLs and upload to Gerrit.
3
4set -ex
5
6function update_step_1_changes() {
7 set +e
8 repo forall -c '\
9 if [[ $(git status --short) ]]; then
10 git stash -u ;
11 repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization" ;
12 git stash pop ;
13 git add -A . ;
14 git commit --amend --no-edit ;
15 repo upload --cbr --no-verify -o nokeycheck -t -y . ;
16 fi'
17}
18
19function update_step_1_main() {
20 local top="$(dirname "$0")"/../../../..
21 source $top/build/make/tools/finalization/environment.sh
22
23
24 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
25
26 # vndk etc finalization
27 source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
28
29 # update existing CLs and upload to gerrit
30 update_step_1_changes
31
32 # build to confirm everything is OK
33 AIDL_FROZEN_REL=true $m
34}
35
36update_step_1_main