mirror of https://github.com/CalyxOS/scripts
aosp-merger: Check if branch exists before abandoning
This gets rid of repo abandon errors. Change-Id: I97698b393e58365a56b02c3173b5482e8344d587
This commit is contained in:
parent
259965cf96
commit
c687bd73d9
|
@ -66,7 +66,9 @@ STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
|||
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
# Ditch any existing staging branches
|
||||
repo abandon "${STAGINGBRANCH}" .
|
||||
if [[ "$(git show-ref --verify --quiet refs/heads/${STAGINGBRANCH})" ]]; then
|
||||
repo abandon "${STAGINGBRANCH}" .
|
||||
fi
|
||||
repo start "${STAGINGBRANCH}" .
|
||||
if [ -f ".gitupstream-lineage" ]; then
|
||||
if grep -q "${lineageos_device_branch}" .gitupstream-lineage; then
|
||||
|
|
|
@ -66,7 +66,9 @@ STAGINGBRANCH="staging/${BRANCHSUFFIX}"
|
|||
|
||||
cd "${TOP}/${PROJECTPATH}"
|
||||
# Ditch any existing staging branches
|
||||
repo abandon "${STAGINGBRANCH}" .
|
||||
if [[ "$(git show-ref --verify --quiet refs/heads/${STAGINGBRANCH})" ]]; then
|
||||
repo abandon "${STAGINGBRANCH}" .
|
||||
fi
|
||||
repo start "${STAGINGBRANCH}" .
|
||||
if [ -f ".gitupstream" ]; then
|
||||
git fetch -q --force --tags "$(cat .gitupstream)" "${NEWTAG}"
|
||||
|
|
Loading…
Reference in New Issue