blob: b469988f2b765e7d181af3928b9060da7342edda [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
Alex Buynytskyyd98c43c2023-04-11 16:47:35 +00004# WIP, does not work yet
5exit 10
6
Alex Buynytskyy307d9bc2023-04-06 14:14:34 -07007set -ex
8
9function update_step_1_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" ;
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_1_main() {
23 local top="$(dirname "$0")"/../../../..
24 source $top/build/make/tools/finalization/environment.sh
25
26
27 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
28
29 # vndk etc finalization
30 source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
31
32 # update existing CLs and upload to gerrit
33 update_step_1_changes
34
35 # build to confirm everything is OK
36 AIDL_FROZEN_REL=true $m
37}
38
39update_step_1_main