Skip to content

Commit

Permalink
Bazel release process: Fix broken "git push" by setting direct push j…
Browse files Browse the repository at this point in the history
…ustification.

PiperOrigin-RevId: 571307569
Change-Id: I4e5d40cf5cccde9137d075db3604e4215a089eb3
  • Loading branch information
fweikert committed Oct 6, 2023
1 parent 75c3014 commit f5ccac0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function __create_release() {
# Force push a ref $2 to repo $1 if exists
function __push_if_exists() {
if git show-ref -q "${2}"; then
git push -f "${1}" "+${2}"
git push -f "${1}" "+${2}" -o push-justification b/303672453
fi
}

Expand All @@ -183,7 +183,7 @@ function __cleanup_branches() {
do
echo "Deleting ${branch}"
git branch -D "${branch}" &>/dev/null || true
git push -f "${RELEASE_REPOSITORY}" ":${branch}" &>/dev/null || true
git push -f "${RELEASE_REPOSITORY}" ":${branch}" -o push-justification b/303672453 &>/dev/null || true
done
}

Expand Down Expand Up @@ -223,7 +223,7 @@ function __do_release() {
trap - EXIT

echo "Pushing the change to remote repositories"
git push "${MASTER_REPOSITORY}" +master
git push "${MASTER_REPOSITORY}" +master -o push-justification b/303672453
__push_ref "refs/tags/${tag_name}"
fi
}
Expand Down

0 comments on commit f5ccac0

Please sign in to comment.