Justin Yun | 7c28c23 | 2024-01-31 16:56:10 +0900 | [diff] [blame] | 1 | #!/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 | |
| 6 | set -ex |
| 7 | |
| 8 | function commit_step_0_changes() { |
| 9 | set +e |
| 10 | repo forall -c '\ |
| 11 | if [[ $(git status --short) ]]; then |
Mårten Kongstad | 6c6a1b5 | 2024-04-08 16:18:47 +0200 | [diff] [blame] | 12 | repo start "'$repo_branch'" ; |
Justin Yun | 7c28c23 | 2024-01-31 16:56:10 +0900 | [diff] [blame] | 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 |
| 16 | Bug: $FINAL_BUG_ID |
| 17 | Test: build"; |
Mårten Kongstad | e851b8f | 2024-04-04 09:47:29 +0200 | [diff] [blame] | 18 | repo upload '"$repo_upload_dry_run_arg"' --cbr --no-verify -o nokeycheck -t -y . ; |
Justin Yun | 7c28c23 | 2024-01-31 16:56:10 +0900 | [diff] [blame] | 19 | fi' |
| 20 | } |
| 21 | |
| 22 | function finalize_step_0_main() { |
| 23 | local top="$(dirname "$0")"/../../../.. |
| 24 | source $top/build/make/tools/finalization/environment.sh |
Mårten Kongstad | 6c6a1b5 | 2024-04-08 16:18:47 +0200 | [diff] [blame] | 25 | local repo_branch="VINTF-$FINAL_BOARD_API_LEVEL-Finalization" |
| 26 | source $top/build/make/tools/finalization/command-line-options.sh |
Justin Yun | 7c28c23 | 2024-01-31 16:56:10 +0900 | [diff] [blame] | 27 | |
| 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 Kongstad | e851b8f | 2024-04-04 09:47:29 +0200 | [diff] [blame] | 39 | finalize_step_0_main $@ |