Files
build/tools/finalization/build-step-0.sh
Justin Yun 7fc38029ec Update vintf finalization script
Run vintf finalization if the target configuration does not set
RELEASE_BOARD_API_LEVEL_FROZEN to 'true'; and FINAL_BOARD_API_LEVEL
which is the version to finalize is the same with the
RELEASE_BOARD_API_LEVEL which is the version that the current tree is
building.

Also define build-step-0-and-m.sh that runs a test build after the
vintf finalization process.

Ignore-AOSP-First: finalization script is an exception
Bug: 331696132
Test: tools/finalization/build-step-0-and-m.sh
Change-Id: I22b9096d57c935e64c4d28f16b95afaa84b79465
2024-07-26 11:09:09 +09:00

33 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Copyright 2024 Google Inc. All rights reserved.
set -ex
function finalize_main_step0() {
local top="$(dirname "$0")"/../../../..
source $top/build/make/tools/finalization/environment.sh
local need_vintf_finalize=false
if [ "$FINAL_STATE" = "unfinalized" ] ; then
need_vintf_finalize=true
else
# build-step-0.sh tests the vintf finalization step (step-0) when the
# FINAL_BOARD_API_LEVEL is the same as the RELEASE_BOARD_API_LEVEL; and
# RELEASE_BOARD_API_LEVEL_FROZEN is not true from the fina_0 configuration.
# The FINAL_BOARD_API_LEVEL must be the next vendor API level to be finalized.
local board_api_level_vars=$(TARGET_RELEASE=fina_0 $top/build/soong/soong_ui.bash --dumpvars-mode -vars "RELEASE_BOARD_API_LEVEL_FROZEN RELEASE_BOARD_API_LEVEL")
local target_board_api_level_vars="RELEASE_BOARD_API_LEVEL_FROZEN=''
RELEASE_BOARD_API_LEVEL='$FINAL_BOARD_API_LEVEL'"
if [ "$board_api_level_vars" = "$target_board_api_level_vars" ] ; then
echo The target is a finalization candidate.
need_vintf_finalize=true
fi;
fi;
if [ "$need_vintf_finalize" = true ] ; then # VINTF finalization
source $top/build/make/tools/finalization/finalize-vintf-resources.sh
fi;
}
finalize_main_step0