Alex Buynytskyy | 10411ee | 2024-03-15 03:14:14 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Script to perform a dry run of step 1 of Android Finalization, create CLs and upload to Gerrit. |
| 3 | |
| 4 | function commit_step_1_changes() { |
| 5 | repo forall -c '\ |
| 6 | if [[ $(git status --short) ]]; then |
| 7 | repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization-DryRun" ; |
| 8 | git add -A . ; |
| 9 | git commit -m "$FINAL_PLATFORM_CODENAME is now $FINAL_PLATFORM_SDK_VERSION" \ |
| 10 | -m "Ignore-AOSP-First: $FINAL_PLATFORM_CODENAME Finalization |
| 11 | Bug: $FINAL_BUG_ID |
| 12 | Test: build"; |
| 13 | |
| 14 | repo upload --cbr --no-verify -o nokeycheck -t -y . ; |
| 15 | fi' |
| 16 | } |
| 17 | |
| 18 | function finalize_step_1_main() { |
| 19 | local top="$(dirname "$0")"/../../../.. |
| 20 | source $top/build/make/tools/finalization/environment.sh |
| 21 | |
| 22 | source $top/build/make/tools/finalization/finalize-sdk-resources.sh |
| 23 | |
| 24 | # move all changes to finalization branch/topic and upload to gerrit |
| 25 | commit_step_1_changes |
| 26 | |
| 27 | # build to confirm everything is OK |
| 28 | local m_next="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug" |
Devin Moore | 920037c | 2024-04-05 15:32:38 +0000 | [diff] [blame] | 29 | $m_next |
Alex Buynytskyy | 10411ee | 2024-03-15 03:14:14 +0000 | [diff] [blame] | 30 | |
| 31 | local m_fina="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=fina_1 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug" |
Devin Moore | 920037c | 2024-04-05 15:32:38 +0000 | [diff] [blame] | 32 | $m_fina |
Alex Buynytskyy | 10411ee | 2024-03-15 03:14:14 +0000 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | finalize_step_1_main |