aosp-merger: Make script output a bit more readable
Change-Id: Ia624f82dd19b7d6e7902eaec3584748db72a90b5
This commit is contained in:
committed by
Michael Bestas
parent
a045b16bfe
commit
7748a3c18d
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project
|
||||
# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute
|
||||
# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -97,7 +97,7 @@ if [ ! -z "${OLDTAG}" ]; then
|
||||
fi
|
||||
|
||||
if [[ "${OPERATION}" == "merge" ]]; then
|
||||
echo "#### Merging ${NEWTAG} into ${PROJECTPATH} ####"
|
||||
echo -e "\n#### Merging ${NEWTAG} into ${PROJECTPATH} ####"
|
||||
git merge --no-commit --log "${NEWTAG}" && git commit --no-edit
|
||||
|
||||
# Check if we've actually changed anything after the merge
|
||||
@@ -108,7 +108,7 @@ if [[ "${OPERATION}" == "merge" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
elif [[ "${OPERATION}" == "rebase" ]]; then
|
||||
echo "#### Rebasing ${PROJECTPATH} onto ${NEWTAG} ####"
|
||||
echo -e "\n#### Rebasing ${PROJECTPATH} onto ${NEWTAG} ####"
|
||||
git rebase --onto "${NEWTAG}" "${OLDTAG}"
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project
|
||||
# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute
|
||||
# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -98,7 +98,7 @@ fi
|
||||
|
||||
CONFLICT=""
|
||||
|
||||
echo "#### Merging ${NEWTAG} into ${PROJECTPATH} ####"
|
||||
echo -e "\n#### Merging ${NEWTAG} into ${PROJECTPATH} ####"
|
||||
git merge --no-commit --log "${NEWTAG}"
|
||||
|
||||
if [[ -z "$(git diff --no-ext-diff HEAD)" ]]; then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project
|
||||
# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute
|
||||
# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -59,10 +59,10 @@ STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
||||
# Build list of forked repos
|
||||
PROJECTPATHS=$(grep "name=\"LineageOS/" "${MANIFEST}" | sed -n 's/.*path="\([^"]\+\)".*/\1/p')
|
||||
|
||||
echo "#### Old tag = ${OLDTAG} Branch = ${BRANCH} Staging branch = ${STAGINGBRANCH} ####"
|
||||
echo -e "\n#### Old tag = ${OLDTAG} Branch = ${BRANCH} Staging branch = ${STAGINGBRANCH} ####"
|
||||
|
||||
# Make sure manifest and forked repos are in a consistent state
|
||||
echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
if [[ -n "$(git status --porcelain)" ]]; then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project
|
||||
# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute
|
||||
# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -59,10 +59,10 @@ STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
||||
# Build list of AOSP repos
|
||||
PROJECTPATHS=$(grep -v "remote=\"gitlab" "${MANIFEST}" | grep -v "clone-depth=\"1" | sed -n 's/.*path="\([^"]\+\)".*/\1/p')
|
||||
|
||||
echo "#### Old tag = ${OLDTAG} New tag = ${NEWTAG} Staging branch = ${STAGINGBRANCH} ####"
|
||||
echo -e "\n#### Old tag = ${OLDTAG} New tag = ${NEWTAG} Staging branch = ${STAGINGBRANCH} ####"
|
||||
|
||||
# Make sure manifest and forked repos are in a consistent state
|
||||
echo "#### Verifying there are no uncommitted changes on AOSP projects ####"
|
||||
echo -e "\n#### Verifying there are no uncommitted changes on AOSP projects ####"
|
||||
for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
if [[ -n "$(git status --porcelain)" ]]; then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project
|
||||
# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute
|
||||
# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -49,10 +49,10 @@ source "${TOP}/build/envsetup.sh"
|
||||
# List of merged repos
|
||||
PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}')
|
||||
|
||||
echo "#### Staging branch = ${STAGINGBRANCH} ####"
|
||||
echo -e "\n#### Staging branch = ${STAGINGBRANCH} ####"
|
||||
|
||||
# Make sure manifest and forked repos are in a consistent state
|
||||
echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
if [[ -n "$(git status --porcelain)" ]]; then
|
||||
@@ -62,7 +62,7 @@ for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do
|
||||
done
|
||||
echo "#### Verification complete - no uncommitted changes found ####"
|
||||
|
||||
echo "#### $(basename ${MERGEDREPOS}) ####"
|
||||
echo -e "\n#### $(basename ${MERGEDREPOS}) ####"
|
||||
read -p "Pushing ${STAGINGBRANCH}. Press enter to confirm."
|
||||
|
||||
# Iterate over each forked project
|
||||
@@ -78,7 +78,7 @@ for PROJECTPATH in ${PROJECTPATHS}; do
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "#### Submitting ${PROJECTPATH} merge ####"
|
||||
echo -e "\n#### Submitting ${PROJECTPATH} merge ####"
|
||||
git checkout "${STAGINGBRANCH}"
|
||||
lineageremote | grep -v "Remote 'lineage' created"
|
||||
git push lineage HEAD:refs/heads/"${BRANCH}"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project
|
||||
# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute
|
||||
# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -54,10 +54,10 @@ fi
|
||||
# List of merged repos
|
||||
PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}')
|
||||
|
||||
echo "#### Branch = ${BRANCH} Squash branch = ${SQUASHBRANCH} ####"
|
||||
echo -e "\n#### Branch = ${BRANCH} Squash branch = ${SQUASHBRANCH} ####"
|
||||
|
||||
# Make sure manifest and forked repos are in a consistent state
|
||||
echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
if [[ -n "$(git status --porcelain)" ]]; then
|
||||
@@ -70,7 +70,7 @@ echo "#### Verification complete - no uncommitted changes found ####"
|
||||
# Iterate over each forked project
|
||||
for PROJECTPATH in ${PROJECTPATHS}; do
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
echo "#### Squashing ${PROJECTPATH} ####"
|
||||
echo -e "\n#### Squashing ${PROJECTPATH} ####"
|
||||
repo abandon "${SQUASHBRANCH}" .
|
||||
git checkout -b "${SQUASHBRANCH}" "${STAGINGBRANCH}"
|
||||
git branch --set-upstream-to=m/"${BRANCH}"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project
|
||||
# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute
|
||||
# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -59,10 +59,10 @@ source "${TOP}/build/envsetup.sh"
|
||||
# List of merged repos
|
||||
PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}')
|
||||
|
||||
echo "#### Staging branch = ${STAGINGBRANCH} ####"
|
||||
echo -e "\n#### Staging branch = ${STAGINGBRANCH} ####"
|
||||
|
||||
# Make sure manifest and forked repos are in a consistent state
|
||||
echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
if [[ -n "$(git status --porcelain)" ]]; then
|
||||
@@ -85,7 +85,7 @@ for PROJECTPATH in ${PROJECTPATHS}; do
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "#### Pushing ${PROJECTPATH} merge to review ####"
|
||||
echo -e "\n#### Pushing ${PROJECTPATH} merge to review ####"
|
||||
git checkout "${STAGINGBRANCH}"
|
||||
lineageremote | grep -v "Remote 'lineage' created"
|
||||
FIRST_SHA="$(git show -s --pretty=%P HEAD | cut -d ' ' -f 1)"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project
|
||||
# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute
|
||||
# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -56,10 +56,10 @@ fi
|
||||
# List of merged repos
|
||||
PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}')
|
||||
|
||||
echo "#### Squash branch = ${SQUASHBRANCH} ####"
|
||||
echo -e "\n#### Squash branch = ${SQUASHBRANCH} ####"
|
||||
|
||||
# Make sure manifest and forked repos are in a consistent state
|
||||
echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####"
|
||||
for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
if [[ -n "$(git status --porcelain)" ]]; then
|
||||
@@ -72,7 +72,7 @@ echo "#### Verification complete - no uncommitted changes found ####"
|
||||
# Iterate over each forked project
|
||||
for PROJECTPATH in ${PROJECTPATHS}; do
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
echo "#### Pushing ${PROJECTPATH} squash to review ####"
|
||||
echo -e "\n#### Pushing ${PROJECTPATH} squash to review ####"
|
||||
git checkout "${SQUASHBRANCH}"
|
||||
repo upload -c -y --no-verify -o topic="${TOPIC}" .
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user