blob: f883bca673719619525d302218d2e3f7179e3117 [file] [log] [blame]
Alex Buynytskyy10411ee2024-03-15 03:14:14 +00001#!/bin/bash
2# Script to perform 1st and 2nd step of Android Finalization, create CLs and upload to Gerrit.
3
4function commit_step_2_changes() {
5 repo forall -c '\
6 if [[ $(git status --short) ]]; then
7 repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization-DryRun-Rel" ;
8 git add -A . ;
9 git commit -m "$FINAL_PLATFORM_CODENAME/$FINAL_PLATFORM_SDK_VERSION is now REL" \
10 -m "Ignore-AOSP-First: $FINAL_PLATFORM_CODENAME Finalization
11Bug: $FINAL_BUG_ID
12Test: build";
13
14 repo upload --cbr --no-verify -o nokeycheck -t -y . ;
15 fi'
16}
17
18function finalize_step_2_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 source $top/build/make/tools/finalization/localonly-steps.sh
25
26 source $top/build/make/tools/finalization/finalize-sdk-rel.sh
27
28 # move all changes to finalization branch/topic and upload to gerrit
29 commit_step_2_changes
30
31 # build to confirm everything is OK
32 local m_next="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
Devin Moore920037c2024-04-05 15:32:38 +000033 $m_next
Alex Buynytskyy10411ee2024-03-15 03:14:14 +000034
35 local m_fina="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=fina_2 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
Devin Moore920037c2024-04-05 15:32:38 +000036 $m_fina
Alex Buynytskyy10411ee2024-03-15 03:14:14 +000037}
38
39finalize_step_2_main