Commit Graph

32 Commits

Author SHA1 Message Date
Alexander Færøy
22552ad88e Update scripts to use main instead of master.
When talking about the "master" Tor checkout, we now refer to it as "the
primary Tor repository". The "master" branch is instead called "main".

See: tpo/core/team#2.
2021-05-25 00:20:58 +00:00
Nick Mathewson
d9152b8a66 Update git scripts to use git-list-tor-branches.sh 2020-03-05 10:29:35 -05:00
Nick Mathewson
7404b6fb71 Update scripts/git/*.sh to know about 043 and not about 040. 2020-02-11 10:52:42 -05:00
teor
c80694decc
scripts/git: Improve branch list comments
Hopefully, these explanations make it easier to get the next branch
transition right.

Part of 32772.
2020-01-15 12:28:00 +10:00
teor
536eeb4589
scripts/git: Fix git-merge-forward after removing 0.2.9
We need a test branch for the earliest maint branch (maint-0.3.5),
but we can't merge forward into it, because there is no previous
active maint branch.

Also, edit a git-push-all comment that still said "029".

Bugfix on 32772; bug not in any released version of tor.
2020-01-15 12:22:38 +10:00
rl1987
c0dd214c8a Remove 0.2.9 from git scripts 2019-12-30 12:41:08 +07:00
teor
7ee1e16c6f
scripts/git: Stop failing when upstream branches don't exist
If you add a custom remote, or a new branch, and don't fetch first,
then the script would fail when checking for unchanged branches.

Instead, skip the check: a new branch is definitely a change.
2019-11-07 12:04:51 +10:00
teor
3864536b7c
scripts/git: Remove extra printfs from a bad merge 2019-11-07 12:04:22 +10:00
teor
e6b5a1ff93
shellcheck: Fix minor issues in some scripts
Fix minor issues in git-push-all.sh, git-setup-dirs.sh and
test_parseconf.sh.

Fixes bug 32402; not in any released version of tor.
Obviously correct changes to already reviewed code.
2019-11-06 16:21:01 +10:00
teor
f7b45975bf
Merge branch 'bug32402_042' into bug32402_master
Merge changes from master with shellcheck fixes.
2019-11-06 16:14:06 +10:00
teor
7f23d47f72
shellcheck: Fix issues in the git-*.sh scripts
Fixes bug 32402; bugfix on 0.4.2.1-alpha.
Obviously correct changes to already reviewed code.
2019-11-06 16:09:31 +10:00
teor
f43a7a4d96
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.
2019-10-23 13:28:37 +10:00
teor
4f6f006c99
scripts/git: Make git-push-all.sh skip more branches that match upstream
The script now skips master, maint-* and release-* branches that match
upstream, not just test branches.

And fix "no branches" bugs that this change makes happen more often.

Part of 32216.
2019-10-23 13:28:15 +10:00
teor
9a3b768fae
scripts/git: Pass all unrecognised arguments to git-push-all.sh
This makes the behaviour of git-push-all.sh -n identical to the other
git scripts.

Part of 32216.
2019-10-23 13:04:28 +10:00
teor
71191fa3dc
scripts/git: Fix a variable name typo in git-push-all.sh
Obviously correct changes to already reviewed code.
2019-10-23 13:01:55 +10:00
Nick Mathewson
78f4e29219 git scripts: add maint/release-0.4.2. 2019-10-11 17:26:34 -04:00
teor
f0044e44f2
scripts: Make the git scripts show usage messages
All of the git scripts now have usage messages on:
* a new -h option, and
* usage errors.

Closes 31677.
2019-09-10 12:14:49 +10:00
teor
97da440f9e
scripts: Improve a usage message in git-push-all.sh
Part of 31677.
2019-09-10 12:12:04 +10:00
teor
51b792b000
scripts: Allow git-push-all.sh to be run from any directory
Closes 31678.
2019-09-10 12:10:28 +10:00
teor
e155598fe3
scripts/git: fix shellcheck issues in git-push-all.sh
Part of 31314.
2019-08-29 23:13:29 +10:00
teor
d0e31b4d1f
scripts/git: Quote shell arguments where possible
Most shell arguments should be quoted to avoid mistakes.

But since all branch names are hard-coded, or supplied by the script user,
we don't need to be too concerned about command injection.

Quoting all shell arguments would take a major refactor.
(Probably using arrays.)

Part of 31314.
2019-08-29 22:53:44 +10:00
teor
664e6a392e
scripts/git: Improve usage documentation for merge-forward and push-all
Part of 31314.
2019-08-29 22:52:21 +10:00
teor
b47b71ad2f
scripts/git: Let git-push-all.sh skip unchanged test branches
Skip test branches that are the same as remote maint/release/master
branches.

Add a TOR_PUSH_SAME and -s argument to git-push-all.sh to change this
default.

Part of 31314.
2019-08-29 22:50:47 +10:00
teor
70387054b9
scripts/git: Make the git push command and args configurable
TOR_GIT_PUSH provides the git push command and default arguments.

Also fix handling of git-push-all.sh script arguments and arguments that
are passed through to $TOR_GIT_PUSH, using a "--" argument as a separator.

Fix on 29879.
2019-08-29 22:50:37 +10:00
teor
667311ebbd
scripts/git: Add test branch support to the git scripts
Add a -t <test-branch-prefix> argument to git-merge-forward.sh and
git-push-all.sh, which makes these scripts create, merge forward, and
push test branches.

Add a -r <remote-name> argument to git-push-all.sh, so the script can
push test branches to a personal remote.

Closes ticket 31314.
2019-08-29 22:47:43 +10:00
teor
c98724b022
scripts/git: Cleanup and fix minor git scripts issues
Fix typos, clean up formatting, rewrite some comments, add headings.

Preparation for 31314.
2019-08-29 22:42:37 +10:00
Nick Mathewson
ca667b9a8a Fix/suppress shellcheck warnings in git-push-all.sh
(I've chosen to suppress some instances rather than 'fix' them,
since the fix would require arrays or major refactoring.)

Fixes bug 31519; bug not in any released Tor.
2019-08-26 09:58:38 -04:00
teor
d6202d3128
scripts/git: add TOR_PUSH_DELAY to git-push-all.sh
Add a TOR_PUSH_DELAY variable to git-push-all.sh, which makes the script
push master and maint branches with a delay between each branch. These
delays trigger the CI jobs in a set order, which should show the most
likely failures first.

Also:
* make pushes atomic by default, and
* make the script pass any command-line arguments to git push.

Closes ticket 29879.
2019-08-08 18:59:44 +10:00
teor
973800b847
scripts/git: Stop hard-coding the bash path in the git scripts
Some OSes don't have bash in /usr/bin, others have an ancient bash at
this path.

Fixes bug 30840; bugfix on 0.4.0.1-alpha.
2019-06-11 14:29:10 +10:00
Nick Mathewson
bbddda3a18 push-all: Use TOR_UPSTREAM_REMOTE_NAME to override UPSTREAM_BRANCH
We already allow this override in our pre-push hook, so let's allow
it here too.

(I call my upstream branches "origin")
2019-06-10 09:01:17 -04:00
Nick Mathewson
46da530431 Update git scripts for new versions
{maint,release}-0.4.1 are now real

{maint,release}-0.3.4 are now EOL

Closes ticket 30822
2019-06-10 09:01:17 -04:00
rl1987
888bb9508b Move all git maintenance scripts to separate directory 2019-03-10 18:28:06 +02:00