platform_build/tools/finalization/step-1.sh
Alex Buynytskyy 4fb99d85e6 Finalization bugfixes.
- keep previous platform versions in platform_releases.txt,
- fix for the build version test,
- after discussion with Yuri, keep non-REL resource sdk_int the same.

Bug: 323940469
Test: local run
Ignore-AOSP-First: release configs present in internal repo only
Change-Id: I6637e109191480ded615ef35c9185d927ddaec40
2024-03-12 19:41:05 +00:00

37 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
# Script to perform a 1st step of Android Finalization: API/SDK finalization, create CLs and upload to Gerrit.
set -ex
function commit_step_1_changes() {
set +e
repo forall -c '\
if [[ $(git status --short) ]]; then
repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization" ;
git add -A . ;
git commit -m "$FINAL_PLATFORM_CODENAME is now $FINAL_PLATFORM_SDK_VERSION and extension version $FINAL_MAINLINE_EXTENSION" \
-m "Ignore-AOSP-First: $FINAL_PLATFORM_CODENAME Finalization
Bug: $FINAL_BUG_ID
Test: build";
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
fi'
}
function finalize_step_1_main() {
local top="$(dirname "$0")"/../../../..
source $top/build/make/tools/finalization/environment.sh
source $top/build/make/tools/finalization/finalize-sdk-resources.sh
# move all changes to finalization branch/topic and upload to gerrit
commit_step_1_changes
# build to confirm everything is OK
local m_next="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
AIDL_FROZEN_REL=true $m_next
local m_fina="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=fina_1 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
AIDL_FROZEN_REL=true $m_fina
}
finalize_step_1_main