aosp-merger: Get the correct branch for squash/push from git

Change-Id: I54c3fe16b6c05c7b39ede9c4a4ef05f5b4f44e28
This commit is contained in:
Michael Bestas
2022-06-19 09:00:50 +03:00
committed by Chirayu Desai
parent c5e5975dd1
commit cf357b2ac3
2 changed files with 8 additions and 2 deletions

View File

@@ -36,8 +36,11 @@ readonly vars_path="${script_path}/../../../vendor/lineage/vars"
source "${vars_path}/common"
TOP="${script_path}/../../.."
BRANCH="${lineageos_branch}"
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||')
if [ -z "${BRANCH}" ]; then
BRANCH="${lineageos_branch}"
fi
# Source build environment (needed for lineageremote)
source "${TOP}/build/envsetup.sh"

View File

@@ -44,9 +44,12 @@ readonly vars_path="${script_path}/../../../vendor/lineage/vars"
source "${vars_path}/common"
TOP="${script_path}/../../.."
BRANCH="${lineageos_branch}"
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
SQUASHBRANCH="squash/${BRANCHSUFFIX}"
BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||')
if [ -z "${BRANCH}" ]; then
BRANCH="${lineageos_branch}"
fi
# List of merged repos
PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}')