blob: 0f2bc635a0185414e9ade732b682065d69911285 [file] [log] [blame]
Alex Buynytskyy10411ee2024-03-15 03:14:14 +00001#!/bin/bash
2# Script to perform a dry run of step 1 of Android Finalization, create CLs and upload to Gerrit.
3
4function 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
11Bug: $FINAL_BUG_ID
12Test: build";
13
14 repo upload --cbr --no-verify -o nokeycheck -t -y . ;
15 fi'
16}
17
18function 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 Moore920037c2024-04-05 15:32:38 +000029 $m_next
Alex Buynytskyy10411ee2024-03-15 03:14:14 +000030
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 Moore920037c2024-04-05 15:32:38 +000032 $m_fina
Alex Buynytskyy10411ee2024-03-15 03:14:14 +000033}
34
35finalize_step_1_main