Justin Yun | 7c28c23 | 2024-01-31 16:56:10 +0900 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Copyright 2024 Google Inc. All rights reserved. |
| 3 | |
| 4 | set -ex |
| 5 | |
| 6 | function finalize_main_step0() { |
| 7 | local top="$(dirname "$0")"/../../../.. |
| 8 | source $top/build/make/tools/finalization/environment.sh |
| 9 | |
Justin Yun | 7fc3802 | 2024-07-19 08:43:20 +0900 | [diff] [blame] | 10 | local need_vintf_finalize=false |
Justin Yun | 7c28c23 | 2024-01-31 16:56:10 +0900 | [diff] [blame] | 11 | if [ "$FINAL_STATE" = "unfinalized" ] ; then |
Justin Yun | 7fc3802 | 2024-07-19 08:43:20 +0900 | [diff] [blame] | 12 | need_vintf_finalize=true |
| 13 | else |
| 14 | # build-step-0.sh tests the vintf finalization step (step-0) when the |
| 15 | # FINAL_BOARD_API_LEVEL is the same as the RELEASE_BOARD_API_LEVEL; and |
| 16 | # RELEASE_BOARD_API_LEVEL_FROZEN is not true from the fina_0 configuration. |
| 17 | # The FINAL_BOARD_API_LEVEL must be the next vendor API level to be finalized. |
| 18 | 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") |
| 19 | local target_board_api_level_vars="RELEASE_BOARD_API_LEVEL_FROZEN='' |
| 20 | RELEASE_BOARD_API_LEVEL='$FINAL_BOARD_API_LEVEL'" |
| 21 | if [ "$board_api_level_vars" = "$target_board_api_level_vars" ] ; then |
| 22 | echo The target is a finalization candidate. |
| 23 | need_vintf_finalize=true |
| 24 | fi; |
| 25 | fi; |
| 26 | |
| 27 | if [ "$need_vintf_finalize" = true ] ; then # VINTF finalization |
Justin Yun | 7c28c23 | 2024-01-31 16:56:10 +0900 | [diff] [blame] | 28 | source $top/build/make/tools/finalization/finalize-vintf-resources.sh |
| 29 | fi; |
| 30 | } |
| 31 | |
| 32 | finalize_main_step0 |