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