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 | |
Alex Buynytskyy | d98c43c | 2023-04-11 16:47:35 +0000 | [diff] [blame] | 4 | # WIP, does not work yet |
| 5 | exit 10 |
| 6 | |
| 7 | set -ex |
| 8 | |
Alex Buynytskyy | 307d9bc | 2023-04-06 14:14:34 -0700 | [diff] [blame] | 9 | function update_step_2_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-Rel" ; |
| 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_2_main() { |
| 23 | local top="$(dirname "$0")"/../../../.. |
| 24 | source $top/build/make/tools/finalization/environment.sh |
| 25 | |
| 26 | local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug" |
| 27 | |
| 28 | # prebuilts etc |
| 29 | source $top/build/make/tools/finalization/finalize-sdk-rel.sh |
| 30 | |
| 31 | # move all changes to finalization branch/topic and upload to gerrit |
| 32 | update_step_2_changes |
| 33 | |
| 34 | # build to confirm everything is OK |
| 35 | AIDL_FROZEN_REL=true $m |
| 36 | } |
| 37 | |
| 38 | update_step_2_main |