blob: 8da866c0dc484f792c83be309bd8c153bb5a669c [file] [log] [blame]
Justin Yun7c28c232024-01-31 16:56:10 +09001#!/bin/bash
2# Copyright 2024 Google Inc. All rights reserved.
3
4# Script to perform a 0th step of Android Finalization: VINTF finalization, create CLs and upload to Gerrit.
5
6set -ex
7
8function commit_step_0_changes() {
9 set +e
10 repo forall -c '\
11 if [[ $(git status --short) ]]; then
12 repo start "VINTF-$FINAL_BOARD_API_LEVEL-Finalization" ;
13 git add -A . ;
14 git commit -m "Vendor API level $FINAL_BOARD_API_LEVEL is now frozen" \
15 -m "Ignore-AOSP-First: VINTF $FINAL_BOARD_API_LEVEL Finalization
16Bug: $FINAL_BUG_ID
17Test: build";
Mårten Kongstade851b8f2024-04-04 09:47:29 +020018 repo upload '"$repo_upload_dry_run_arg"' --cbr --no-verify -o nokeycheck -t -y . ;
Justin Yun7c28c232024-01-31 16:56:10 +090019 fi'
20}
21
22function finalize_step_0_main() {
23 local top="$(dirname "$0")"/../../../..
Mårten Kongstade851b8f2024-04-04 09:47:29 +020024 source $top/build/make/tools/finalization/command-line-options.sh
Justin Yun7c28c232024-01-31 16:56:10 +090025 source $top/build/make/tools/finalization/environment.sh
26
27 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
28
29 source $top/build/make/tools/finalization/finalize-vintf-resources.sh
30
31 # move all changes to finalization branch/topic and upload to gerrit
32 commit_step_0_changes
33
34 # build to confirm everything is OK
35 AIDL_FROZEN_REL=true $m
36}
37
Mårten Kongstade851b8f2024-04-04 09:47:29 +020038finalize_step_0_main $@