summaryrefslogtreecommitdiff
path: root/scripts/git
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-10-23 13:28:37 +1000
committerteor <teor@torproject.org>2019-10-23 13:28:37 +1000
commitf43a7a4d968c44781b5009d811aad7eb617ce876 (patch)
tree0fc59e51b6c055258d7899acaa7da5d39e9b92b9 /scripts/git
parent4f6f006c99e875e48a31ad1c62233561780d9e0b (diff)
downloadtor-f43a7a4d968c44781b5009d811aad7eb617ce876.tar.gz
tor-f43a7a4d968c44781b5009d811aad7eb617ce876.zip
scripts/git: Avoid sleeping before the last push in git-push-all.sh
Change the loop order, so that we only sleep between pushes, and avoid sleeping after all the pushes are done. (In rare cases, there may still be an extra sleep.) Part of 32216.
Diffstat (limited to 'scripts/git')
-rwxr-xr-xscripts/git/git-push-all.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/git/git-push-all.sh b/scripts/git/git-push-all.sh
index feb0c30312..ebfa576196 100755
--- a/scripts/git/git-push-all.sh
+++ b/scripts/git/git-push-all.sh
@@ -315,12 +315,15 @@ else
printf "%s\n" "$RELEASE_BRANCHES"
fi
fi
- $GIT_PUSH "$@" "$UPSTREAM_REMOTE" "$MASTER_BRANCH"
- sleep "$PUSH_DELAY"
# shellcheck disable=SC2086
- for b in $MAINT_BRANCHES; do
+ for b in $MASTER_BRANCH $MAINT_BRANCHES; do
$GIT_PUSH "$@" "$UPSTREAM_REMOTE" "$b"
- sleep "$PUSH_DELAY"
+ # If we are pushing more than one branch, delay.
+ # In the unlikely scenario where we are pushing maint without master,
+ # or maint without release, there may be an extra delay
+ if [ "$MAINT_BRANCHES" ] || [ "$RELEASE_BRANCHES" ]; then
+ sleep "$PUSH_DELAY"
+ fi
done
if [ "$RELEASE_BRANCHES" ]; then
# shellcheck disable=SC2086