diff options
author | teor <teor@torproject.org> | 2019-11-06 16:14:06 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-11-06 16:14:06 +1000 |
commit | f7b45975bf4d660d596542f5efd62fd152144199 (patch) | |
tree | 52772fb7100e50413b72bdb3a7a240d5cb234085 /scripts/git | |
parent | 9ca25f3a68374ca4787b4eaa8bf4fb3365061d26 (diff) | |
parent | 7f23d47f723edeea206d5438af3d109dbb4ac835 (diff) | |
download | tor-f7b45975bf4d660d596542f5efd62fd152144199.tar.gz tor-f7b45975bf4d660d596542f5efd62fd152144199.zip |
Merge branch 'bug32402_042' into bug32402_master
Merge changes from master with shellcheck fixes.
Diffstat (limited to 'scripts/git')
-rwxr-xr-x | scripts/git/git-merge-forward.sh | 2 | ||||
-rwxr-xr-x | scripts/git/git-pull-all.sh | 2 | ||||
-rwxr-xr-x | scripts/git/git-push-all.sh | 21 |
3 files changed, 15 insertions, 10 deletions
diff --git a/scripts/git/git-merge-forward.sh b/scripts/git/git-merge-forward.sh index 339573b39c..a6df479590 100755 --- a/scripts/git/git-merge-forward.sh +++ b/scripts/git/git-merge-forward.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_NAME=`basename $0` +SCRIPT_NAME=$(basename "$0") function usage() { diff --git a/scripts/git/git-pull-all.sh b/scripts/git/git-pull-all.sh index 773f97b42b..9e12b565b9 100755 --- a/scripts/git/git-pull-all.sh +++ b/scripts/git/git-pull-all.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_NAME=`basename $0` +SCRIPT_NAME=$(basename "$0") function usage() { diff --git a/scripts/git/git-push-all.sh b/scripts/git/git-push-all.sh index ebfa576196..a1ba754c2f 100755 --- a/scripts/git/git-push-all.sh +++ b/scripts/git/git-push-all.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_NAME=`basename $0` +SCRIPT_NAME=$(basename "$0") function usage() { @@ -257,7 +257,7 @@ if [ "$PUSH_SAME" -eq 0 ]; then fi done if [ "$SKIP_UPSTREAM" ]; then - printf "Skipping unchanged: %s matching remote: %s\n" \ + printf "Skipping unchanged: %s matching remote: %s\\n" \ "$b" "$SKIP_UPSTREAM" else if [ "$NEW_PUSH_BRANCHES" ]; then @@ -287,18 +287,23 @@ if [ "$PUSH_DELAY" -le 0 ]; then $GIT_PUSH "$@" "$UPSTREAM_REMOTE" $PUSH_BRANCHES else # Push the branches in optimal CI order, with a delay between each push - PUSH_BRANCHES=$(echo "$PUSH_BRANCHES" | tr " " "\n" | sort -V) - MASTER_BRANCH=$(echo "$PUSH_BRANCHES" | tr " " "\n" | grep master) \ + PUSH_BRANCHES=$(echo "$PUSH_BRANCHES" | tr " " "\\n" | sort -V) + MASTER_BRANCH=$(echo "$PUSH_BRANCHES" | tr " " "\\n" | grep master) \ || true # Skipped master branch if [ -z "$TEST_BRANCH_PREFIX" ]; then - MAINT_BRANCHES=$(echo "$PUSH_BRANCHES" | tr " " "\n" | grep maint) \ + MAINT_BRANCHES=$(echo "$PUSH_BRANCHES" | tr " " "\\n" | grep maint) \ || true # Skipped all maint branches - RELEASE_BRANCHES=$(echo "$PUSH_BRANCHES" | tr " " "\n" | grep release | \ - tr "\n" " ") || true # Skipped all release branches + RELEASE_BRANCHES=$(echo "$PUSH_BRANCHES" | tr " " "\\n" | grep release | \ + tr "\\n" " ") || true # Skipped all release branches + printf \ + "Pushing with %ss delays, so CI runs in this order:\\n%s\\n%s\\n%s\\n" \ + "$PUSH_DELAY" "$MASTER_BRANCH" "$MAINT_BRANCHES" "$RELEASE_BRANCHES" else # Actually test branches based on maint branches - MAINT_BRANCHES=$(echo "$PUSH_BRANCHES" | tr " " "\n" | grep -v master) \ + MAINT_BRANCHES=$(echo "$PUSH_BRANCHES" | tr " " "\\n" | grep -v master) \ || true # Skipped all maint test branches + printf "Pushing with %ss delays, so CI runs in this order:\\n%s\\n%s\\n" \ + "$PUSH_DELAY" "$MASTER_BRANCH" "$MAINT_BRANCHES" # No release branches RELEASE_BRANCHES= fi |