blob: db7f1ccedbc7da20327a219044cbfa0d9d43bdaf [file] [log] [blame]
Alex Buynytskyyafddc072023-02-09 22:40:53 +00001#!/bin/bash
2# Script to perform a 1st step of Android Finalization: API/SDK finalization, create CLs and upload to Gerrit.
3
4set -ex
5
6function commit_step_1_changes() {
7 set +e
8 repo forall -c '\
9 if [[ $(git status --short) ]]; then
Alex Buynytskyy0fa58fa2023-02-13 20:22:10 +000010 repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization" ;
Alex Buynytskyyafddc072023-02-09 22:40:53 +000011 git add -A . ;
Alex Buynytskyy0fa58fa2023-02-13 20:22:10 +000012 git commit -m "$FINAL_PLATFORM_CODENAME is now $FINAL_PLATFORM_SDK_VERSION" \
13 -m "Ignore-AOSP-First: $FINAL_PLATFORM_CODENAME Finalization
14Bug: $FINAL_BUG_ID
Alex Buynytskyyafddc072023-02-09 22:40:53 +000015Test: build";
16 repo upload --cbr --no-verify -o nokeycheck -t -y . ;
17 git clean -fdx ; git reset --hard ;
18 fi'
19}
20
21function finalize_step_1_main() {
22 local top="$(dirname "$0")"/../../../..
23 source $top/build/make/tools/finalization/environment.sh
24
25 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
26
27 # vndk etc finalization
28 source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
29
30 # build to confirm everything is OK
31 AIDL_FROZEN_REL=true $m
32
33 # move all changes to finalization branch/topic and upload to gerrit
34 commit_step_1_changes
35}
36
37finalize_step_1_main