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

@@ -70,39 +70,39 @@ push_aosp_merge() {
# Merge AOSP to pixel device forks
merge_pixel_device() {
for repo in ${device_repos[@]}; do
"${script_path}"/_subtree_merge_helper.sh --project-path "${repo}" --old-tag "${prev_aosp_tag}" --new-tag "${aosp_tag}" --branch-suffix "${os_branch}_merge-${aosp_tag}"
"${script_path}"/_subtree_merge_helper.sh --project-path "${repo}" --old-tag "${prev_aosp_tag}" --new-tag "${aosp_tag}" --branch-suffix "${device_branch}_merge-${aosp_tag}"
done
}
squash_pixel_device() {
"${script_path}"/squash.sh --new-tag "${aosp_tag}" --branch-suffix "${os_branch}_merge-${aosp_tag}" --pixel
"${script_path}"/squash.sh --new-tag "${aosp_tag}" --branch-suffix "${device_branch}_merge-${aosp_tag}" --pixel
}
upload_squash_device_to_review() {
"${script_path}"/upload-squash.sh --branch-suffix "${os_branch}_merge-${aosp_tag}" --pixel
"${script_path}"/upload-squash.sh --branch-suffix "${device_branch}_merge-${aosp_tag}" --pixel
}
push_device_merge() {
"${script_path}"/push-merge.sh --branch-suffix "${os_branch}_merge-${aosp_tag}"
"${script_path}"/push-merge.sh --branch-suffix "${device_branch}_merge-${aosp_tag}" --pixel
}
# Merge AOSP to pixel kernel forks
merge_pixel_kernel() {
for repo in ${device_kernel_repos}; do
"${script_path}"/_subtree_merge_helper.sh --project-path "${repo}" --old-tag "${prev_kernel_tag}" --new-tag "${kernel_tag}" --branch-suffix "${os_branch}_merge-${kernel_tag}"
"${script_path}"/_subtree_merge_helper.sh --project-path "${repo}" --old-tag "${prev_kernel_tag}" --new-tag "${kernel_tag}" --branch-suffix "${device_branch}_merge-${kernel_tag}"
done
}
squash_pixel_kernel() {
"${script_path}"/squash.sh --new-tag "${kernel_tag}" --branch-suffix "${os_branch}_merge-${kernel_tag}" --pixel
"${script_path}"/squash.sh --new-tag "${kernel_tag}" --branch-suffix "${device_branch}_merge-${kernel_tag}" --pixel
}
upload_squash_kernel_to_review() {
"${script_path}"/upload-squash.sh --branch-suffix "${os_branch}_merge-${kernel_tag}" --pixel
"${script_path}"/upload-squash.sh --branch-suffix "${device_branch}_merge-${kernel_tag}" --pixel
}
push_kernel_merge() {
"${script_path}"/push-merge.sh --branch-suffix "${os_branch}_merge-${kernel_tag}"
"${script_path}"/push-merge.sh --branch-suffix "${device_branch}_merge-${kernel_tag}" --pixel
}
# Merge CLO to forks

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)