Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d35095e5 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

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
parent 5e2d3399
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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