blob: 2087f6e67074d0c0da39902048ee9335816452e0 [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
Mårten Kongstad6c6a1b52024-04-08 16:18:47 +020012 repo start "'$repo_branch'" ;
Justin Yun7c28c232024-01-31 16:56:10 +090013 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")"/../../../..
24 source $top/build/make/tools/finalization/environment.sh
Mårten Kongstad6c6a1b52024-04-08 16:18:47 +020025 local repo_branch="VINTF-$FINAL_BOARD_API_LEVEL-Finalization"
26 source $top/build/make/tools/finalization/command-line-options.sh
Justin Yun7c28c232024-01-31 16:56:10 +090027
28 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
29
30 source $top/build/make/tools/finalization/finalize-vintf-resources.sh
31
32 # move all changes to finalization branch/topic and upload to gerrit
33 commit_step_0_changes
34
35 # build to confirm everything is OK
36 AIDL_FROZEN_REL=true $m
37}
38
Mårten Kongstade851b8f2024-04-04 09:47:29 +020039finalize_step_0_main $@