From c98724b0228b892b738f503434bdc28463ba488c Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 9 Aug 2019 00:14:11 +1000 Subject: scripts/git: Cleanup and fix minor git scripts issues Fix typos, clean up formatting, rewrite some comments, add headings. Preparation for 31314. --- scripts/git/git-push-all.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'scripts/git/git-push-all.sh') diff --git a/scripts/git/git-push-all.sh b/scripts/git/git-push-all.sh index 469d6fe570..617f24cdc5 100755 --- a/scripts/git/git-push-all.sh +++ b/scripts/git/git-push-all.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# Usage: git-push-all.sh +# Usage: git-push-all.sh # env vars: TOR_UPSTREAM_REMOTE_NAME=upstream TOR_PUSH_DELAY=0 -# options: --no-atomic --dry-run (any other git push option) +# git-opts: --no-atomic --dry-run (any other git push option) # # TOR_PUSH_DELAY pushes the master and maint branches separately, so that CI # runs in a sensible order. @@ -10,11 +10,21 @@ set -e +################# +# Configuration # +################# + +# Don't change this configuration - set the env vars in your .profile +# # The upstream remote which git.torproject.org/tor.git points to. UPSTREAM_REMOTE=${TOR_UPSTREAM_REMOTE_NAME:-"upstream"} # Add a delay between pushes, so CI runs on the most important branches first PUSH_DELAY=${TOR_PUSH_DELAY:-0} +######################## +# Git branches to push # +######################## + PUSH_BRANCHES=$(echo \ master \ {release,maint}-0.4.1 \ @@ -23,6 +33,10 @@ PUSH_BRANCHES=$(echo \ {release,maint}-0.2.9 \ ) +############### +# Entry point # +############### + if [ "$PUSH_DELAY" -le 0 ]; then echo "Pushing $PUSH_BRANCHES" # We know that there are no spaces in any branch within $PUSH_BRANCHES, so -- cgit v1.2.3-54-g00ecf