Alex Buynytskyy | afddc07 | 2023-02-09 22:40:53 +0000 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # Script to perform a 1st step of Android Finalization: API/SDK finalization, create CLs and upload to Gerrit. |
| 3 | |
| 4 | set -ex |
| 5 | |
| 6 | function commit_step_1_changes() { |
| 7 | set +e |
| 8 | repo forall -c '\ |
| 9 | if [[ $(git status --short) ]]; then |
| 10 | repo start "$FINA_PLATFORM_CODENAME-SDK-Finalization" ; |
| 11 | git add -A . ; |
| 12 | git commit -m "$FINA_PLATFORM_CODENAME is now $FINA_PLATFORM_SDK_VERSION" \ |
| 13 | -m "Ignore-AOSP-First: $FINA_PLATFORM_CODENAME Finalization |
| 14 | Bug: $FINA_BUG_ID |
| 15 | Test: build"; |
| 16 | repo upload --cbr --no-verify -o nokeycheck -t -y . ; |
| 17 | git clean -fdx ; git reset --hard ; |
| 18 | fi' |
| 19 | } |
| 20 | |
| 21 | function finalize_step_1_main() { |
| 22 | local top="$(dirname "$0")"/../../../.. |
| 23 | source $top/build/make/tools/finalization/environment.sh |
| 24 | |
| 25 | local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug" |
| 26 | |
| 27 | # vndk etc finalization |
| 28 | source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh |
| 29 | |
| 30 | # build to confirm everything is OK |
| 31 | AIDL_FROZEN_REL=true $m |
| 32 | |
| 33 | # move all changes to finalization branch/topic and upload to gerrit |
| 34 | commit_step_1_changes |
| 35 | } |
| 36 | |
| 37 | finalize_step_1_main |