Alex Buynytskyy | 307d9bc | 2023-04-06 14:14:34 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Script to perform a 1st step of Android Finalization: API/SDK finalization, update CLs and upload to Gerrit. |
| 3 | |
| 4 | set -ex |
| 5 | |
| 6 | function update_step_1_changes() { |
| 7 | set +e |
| 8 | repo forall -c '\ |
| 9 | if [[ $(git status --short) ]]; then |
| 10 | git stash -u ; |
| 11 | repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization" ; |
| 12 | git stash pop ; |
| 13 | git add -A . ; |
| 14 | git commit --amend --no-edit ; |
| 15 | repo upload --cbr --no-verify -o nokeycheck -t -y . ; |
| 16 | fi' |
| 17 | } |
| 18 | |
| 19 | function update_step_1_main() { |
| 20 | local top="$(dirname "$0")"/../../../.. |
| 21 | source $top/build/make/tools/finalization/environment.sh |
| 22 | |
| 23 | |
| 24 | local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug" |
| 25 | |
| 26 | # vndk etc finalization |
| 27 | source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh |
| 28 | |
| 29 | # update existing CLs and upload to gerrit |
| 30 | update_step_1_changes |
| 31 | |
| 32 | # build to confirm everything is OK |
| 33 | AIDL_FROZEN_REL=true $m |
| 34 | } |
| 35 | |
| 36 | update_step_1_main |