aosp-merger: Use device_branch for pixel device/kernel merges

Change-Id: Ib3c0479fc753aeeccc13c5fbe8e80c5231cf1a19
This commit is contained in:
Michael Bestas
2022-09-08 04:11:21 +03:00
committed by Chirayu Desai
parent ab49b1e556
commit f4883e22ea
2 changed files with 21 additions and 12 deletions

View File

@@ -7,7 +7,7 @@
#
usage() {
echo "Usage ${0} -b <branch-suffix>"
echo "Usage ${0} -b <branch-suffix> --pixel"
}
# Verify argument count
@@ -16,11 +16,16 @@ if [ "${#}" -eq 0 ]; then
exit 1
fi
PIXEL=false
while [ "${#}" -gt 0 ]; do
case "${1}" in
-b | --branch-suffix )
BRANCHSUFFIX="${2}"; shift
;;
-p | --pixel )
PIXEL=true; shift
;;
* )
usage
exit 1
@@ -37,9 +42,13 @@ source "${vars_path}/common"
TOP="${script_path}/../../.."
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||')
if [ -z "${BRANCH}" ]; then
BRANCH="${os_branch}"
if [ "${PIXEL}" = true ]; then
BRANCH="${device_branch}"
else
BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||')
if [ -z "${BRANCH}" ]; then
BRANCH="${os_branch}"
fi
fi
# Source build environment (needed for lineageremote)