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