blob: 9c68988754a1a033753f9a218a311ce277dc2fac [file] [log] [blame]
Alex Buynytskyyafddc072023-02-09 22:40:53 +00001#!/bin/bash
2# Script to perform a 2nd step of Android Finalization: REL finalization, create CLs and upload to Gerrit.
3
4function commit_step_2_changes() {
5 repo forall -c '\
6 if [[ $(git status --short) ]]; then
7 repo start "$FINA_PLATFORM_CODENAME-SDK-Finalization-Rel" ;
8 git add -A . ;
9 git commit -m "$FINA_PLATFORM_CODENAME/$FINA_PLATFORM_SDK_VERSION is now REL" \
10 -m "Ignore-AOSP-First: $FINA_PLATFORM_CODENAME Finalization
11Bug: $FINA_BUG_ID
12Test: build";
13
14 repo upload --cbr --no-verify -o nokeycheck -t -y . ;
15 git clean -fdx ; git reset --hard ;
16 fi'
17}
18
19function finalize_step_2_main() {
20 local top="$(dirname "$0")"/../../../..
21 source $top/build/make/tools/finalization/environment.sh
22
23 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
24
Alex Buynytskyyafddc072023-02-09 22:40:53 +000025 # prebuilts etc
26 source $top/build/make/tools/finalization/finalize-sdk-rel.sh
27
28 # Update prebuilts.
29 "$top/prebuilts/build-tools/path/linux-x86/python3" "$top/packages/modules/common/tools/finalize_sdk.py" -b ${FINA_BUG_ID} -f ${FINA_MAINLINE_EXTENSION} -r "${FINA_MAINLINE_SDK_COMMIT_MESSAGE}" ${FINA_MAINLINE_SDK_BUILD_ID}
30
31 # build to confirm everything is OK
32 AIDL_FROZEN_REL=true $m
33
34 # move all changes to finalization branch/topic and upload to gerrit
35 commit_step_2_changes
36}
37
38finalize_step_2_main