Fix banchan for trunk stable builds

In the trunk stable builds, we're required to have a
TARGET_RELEASE set.

For now, we hard-code this to "trunk_staging" (and leave a TODO
to accept this as a function argument).

This will have us producing valid builds in places like git_main.

Bug: 307946156
Test: None
Change-Id: Ie418aee2fad192a38beca44cd7d168e0e1b45689
This commit is contained in:
Greg Kaiser
2023-10-27 16:04:30 -06:00
parent 5e2d3399d3
commit d35095e5f4

View File

@@ -947,6 +947,8 @@ function banchan()
{
local showHelp="$(echo $* | xargs -n 1 echo | \grep -E '^(help)$' | xargs)"
local product="$(echo $* | xargs -n 1 echo | \grep -E '^(.*_)?(arm|x86|arm64|riscv64|x86_64|arm64only|x86_64only)$' | xargs)"
# TODO: Expand banchan to take release arguments (and update hmm() usage).
local release="trunk_staging"
local variant="$(echo $* | xargs -n 1 echo | \grep -E '^(user|userdebug|eng)$' | xargs)"
local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|(.*_)?(arm|x86|arm64|riscv64|x86_64))$' | xargs)"
@@ -961,6 +963,10 @@ function banchan()
echo "banchan: Error: Multiple build archs or products supplied: $products"
return
fi
if [ $(echo $release | wc -w) -gt 1 ]; then
echo "banchan: Error: Multiple build releases supplied: $release"
return
fi
if [ $(echo $variant | wc -w) -gt 1 ]; then
echo "banchan: Error: Multiple build variants supplied: $variant"
return
@@ -984,6 +990,7 @@ function banchan()
fi
export TARGET_PRODUCT=$product
export TARGET_RELEASE=$release
export TARGET_BUILD_VARIANT=$variant
export TARGET_BUILD_DENSITY=alldpi
export TARGET_BUILD_TYPE=release