aosp-merger: s/lineageos_branch/os_branch/
Reduce the diff between CalyxOS/LineageOS scripts Change-Id: I70e409e4bb050c4fd6b826912c7a9640c46ab9df
This commit is contained in:
committed by
Chirayu Desai
parent
559a794b49
commit
2538c7d1f9
@@ -57,7 +57,7 @@ source "${vars_path}/common"
|
|||||||
readonly hook="${script_path}/prepare-commit-msg"
|
readonly hook="${script_path}/prepare-commit-msg"
|
||||||
|
|
||||||
TOP="${script_path}/../../.."
|
TOP="${script_path}/../../.."
|
||||||
BRANCH="${lineageos_branch}"
|
BRANCH="${os_branch}"
|
||||||
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
||||||
|
|
||||||
cd "${TOP}/${PROJECTPATH}"
|
cd "${TOP}/${PROJECTPATH}"
|
||||||
@@ -97,7 +97,7 @@ if [[ "${OPERATION}" == "merge" ]]; then
|
|||||||
|
|
||||||
# Check if we've actually changed anything after the merge
|
# Check if we've actually changed anything after the merge
|
||||||
# If we haven't, just abandon the branch
|
# If we haven't, just abandon the branch
|
||||||
if [[ -z "$(git diff HEAD m/${lineageos_branch})" && -z "$(git status --porcelain)" ]]; then
|
if [[ -z "$(git diff HEAD m/${os_branch})" && -z "$(git status --porcelain)" ]]; then
|
||||||
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
||||||
repo abandon "${STAGINGBRANCH}" .
|
repo abandon "${STAGINGBRANCH}" .
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ source "${vars_path}/common"
|
|||||||
readonly hook="${script_path}/prepare-commit-msg"
|
readonly hook="${script_path}/prepare-commit-msg"
|
||||||
|
|
||||||
TOP="${script_path}/../../.."
|
TOP="${script_path}/../../.."
|
||||||
BRANCH="${lineageos_branch}"
|
BRANCH="${os_branch}"
|
||||||
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
||||||
|
|
||||||
cd "${TOP}/${PROJECTPATH}"
|
cd "${TOP}/${PROJECTPATH}"
|
||||||
@@ -133,7 +133,7 @@ done
|
|||||||
|
|
||||||
# Check if we've actually changed anything after the merge
|
# Check if we've actually changed anything after the merge
|
||||||
# If we haven't, just abandon the branch
|
# If we haven't, just abandon the branch
|
||||||
if [[ -z "$(git diff HEAD m/${lineageos_branch})" && -z "$(git status --porcelain)" ]]; then
|
if [[ -z "$(git diff HEAD m/${os_branch})" && -z "$(git status --porcelain)" ]]; then
|
||||||
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
||||||
repo abandon "${STAGINGBRANCH}" .
|
repo abandon "${STAGINGBRANCH}" .
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -52,74 +52,74 @@ merge_aosp() {
|
|||||||
|
|
||||||
# Merge AOSP to forks
|
# Merge AOSP to forks
|
||||||
merge_aosp_forks() {
|
merge_aosp_forks() {
|
||||||
"${script_path}"/merge-aosp-forks.sh --old-tag "${prev_common_aosp_tag}" --new-tag "${common_aosp_tag}" --branch-suffix "${lineageos_branch}_merge-${common_aosp_tag}"
|
"${script_path}"/merge-aosp-forks.sh --old-tag "${prev_common_aosp_tag}" --new-tag "${common_aosp_tag}" --branch-suffix "${os_branch}_merge-${common_aosp_tag}"
|
||||||
}
|
}
|
||||||
|
|
||||||
squash_aosp_merge() {
|
squash_aosp_merge() {
|
||||||
"${script_path}"/squash.sh --branch-suffix "${lineageos_branch}_merge-${common_aosp_tag}"
|
"${script_path}"/squash.sh --branch-suffix "${os_branch}_merge-${common_aosp_tag}"
|
||||||
}
|
}
|
||||||
|
|
||||||
upload_squash_aosp_to_review() {
|
upload_squash_aosp_to_review() {
|
||||||
"${script_path}"/upload-squash.sh --branch-suffix "${lineageos_branch}_merge-${common_aosp_tag}"
|
"${script_path}"/upload-squash.sh --branch-suffix "${os_branch}_merge-${common_aosp_tag}"
|
||||||
}
|
}
|
||||||
|
|
||||||
push_aosp_merge() {
|
push_aosp_merge() {
|
||||||
"${script_path}"/push-merge.sh --branch-suffix "${lineageos_branch}_merge-${common_aosp_tag}"
|
"${script_path}"/push-merge.sh --branch-suffix "${os_branch}_merge-${common_aosp_tag}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Merge AOSP to pixel device forks
|
# Merge AOSP to pixel device forks
|
||||||
merge_pixel_device() {
|
merge_pixel_device() {
|
||||||
for repo in ${device_repos[@]}; do
|
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 "${lineageos_branch}_merge-${aosp_tag}"
|
"${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}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
squash_pixel_device() {
|
squash_pixel_device() {
|
||||||
"${script_path}"/squash.sh --new-tag "${aosp_tag}" --branch-suffix "${lineageos_branch}_merge-${aosp_tag}" --pixel
|
"${script_path}"/squash.sh --new-tag "${aosp_tag}" --branch-suffix "${os_branch}_merge-${aosp_tag}" --pixel
|
||||||
}
|
}
|
||||||
|
|
||||||
upload_squash_device_to_review() {
|
upload_squash_device_to_review() {
|
||||||
"${script_path}"/upload-squash.sh --branch-suffix "${lineageos_branch}_merge-${aosp_tag}" --pixel
|
"${script_path}"/upload-squash.sh --branch-suffix "${os_branch}_merge-${aosp_tag}" --pixel
|
||||||
}
|
}
|
||||||
|
|
||||||
push_device_merge() {
|
push_device_merge() {
|
||||||
"${script_path}"/push-merge.sh --branch-suffix "${lineageos_branch}_merge-${aosp_tag}"
|
"${script_path}"/push-merge.sh --branch-suffix "${os_branch}_merge-${aosp_tag}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Merge AOSP to pixel kernel forks
|
# Merge AOSP to pixel kernel forks
|
||||||
merge_pixel_kernel() {
|
merge_pixel_kernel() {
|
||||||
for repo in ${device_kernel_repos}; do
|
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 "${lineageos_branch}_merge-${kernel_tag}"
|
"${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}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
squash_pixel_kernel() {
|
squash_pixel_kernel() {
|
||||||
"${script_path}"/squash.sh --new-tag "${kernel_tag}" --branch-suffix "${lineageos_branch}_merge-${kernel_tag}" --pixel
|
"${script_path}"/squash.sh --new-tag "${kernel_tag}" --branch-suffix "${os_branch}_merge-${kernel_tag}" --pixel
|
||||||
}
|
}
|
||||||
|
|
||||||
upload_squash_kernel_to_review() {
|
upload_squash_kernel_to_review() {
|
||||||
"${script_path}"/upload-squash.sh --branch-suffix "${lineageos_branch}_merge-${kernel_tag}" --pixel
|
"${script_path}"/upload-squash.sh --branch-suffix "${os_branch}_merge-${kernel_tag}" --pixel
|
||||||
}
|
}
|
||||||
|
|
||||||
push_kernel_merge() {
|
push_kernel_merge() {
|
||||||
"${script_path}"/push-merge.sh --branch-suffix "${lineageos_branch}_merge-${kernel_tag}"
|
"${script_path}"/push-merge.sh --branch-suffix "${os_branch}_merge-${kernel_tag}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Merge CLO to forks
|
# Merge CLO to forks
|
||||||
merge_clo() {
|
merge_clo() {
|
||||||
"${script_path}"/_merge_helper.sh --project-path "${repo}" --new-tag "${1}" --branch-suffix "${lineageos_branch}_merge-${1}"
|
"${script_path}"/_merge_helper.sh --project-path "${repo}" --new-tag "${1}" --branch-suffix "${os_branch}_merge-${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
squash_clo_merge() {
|
squash_clo_merge() {
|
||||||
"${script_path}"/squash.sh --new-tag "${1}" --branch-suffix "${lineageos_branch}_merge-${1}"
|
"${script_path}"/squash.sh --new-tag "${1}" --branch-suffix "${os_branch}_merge-${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
upload_squash_clo_to_review() {
|
upload_squash_clo_to_review() {
|
||||||
"${script_path}"/upload-squash.sh --new-tag "${1}" --branch-suffix "${lineageos_branch}_merge-${1}"
|
"${script_path}"/upload-squash.sh --new-tag "${1}" --branch-suffix "${os_branch}_merge-${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
push_clo_merge() {
|
push_clo_merge() {
|
||||||
"${script_path}"/push-merge.sh --branch-suffix "${lineageos_branch}_merge-${1}"
|
"${script_path}"/push-merge.sh --branch-suffix "${os_branch}_merge-${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# error message
|
# error message
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ source "${vars_path}/common"
|
|||||||
|
|
||||||
TOP="${script_path}/../../.."
|
TOP="${script_path}/../../.."
|
||||||
MANIFEST="${TOP}/.repo/manifests/default.xml"
|
MANIFEST="${TOP}/.repo/manifests/default.xml"
|
||||||
BRANCH="${lineageos_branch}"
|
BRANCH="${os_branch}"
|
||||||
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
||||||
|
|
||||||
# Source build environment (needed for aospremote)
|
# Source build environment (needed for aospremote)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ TOP="${script_path}/../../.."
|
|||||||
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
||||||
BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||')
|
BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||')
|
||||||
if [ -z "${BRANCH}" ]; then
|
if [ -z "${BRANCH}" ]; then
|
||||||
BRANCH="${lineageos_branch}"
|
BRANCH="${os_branch}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Source build environment (needed for lineageremote)
|
# Source build environment (needed for lineageremote)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
|||||||
SQUASHBRANCH="squash/${BRANCHSUFFIX}"
|
SQUASHBRANCH="squash/${BRANCHSUFFIX}"
|
||||||
BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||')
|
BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||')
|
||||||
if [ -z "${BRANCH}" ]; then
|
if [ -z "${BRANCH}" ]; then
|
||||||
BRANCH="${lineageos_branch}"
|
BRANCH="${os_branch}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# List of merged repos
|
# List of merged repos
|
||||||
|
|||||||
Reference in New Issue
Block a user