diff --git a/envsetup.sh b/envsetup.sh index e5d4eb73ce..b3cf988ad3 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -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