diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-08-04 16:45:12 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-08-04 16:45:12 -0600 |
commit | 1596415c32f6008fcacc14a3a5394787aeb44265 (patch) | |
tree | d360fa51313280b81326828b933d8927d292529e /tools/ci/push_docs_to_repo.py | |
parent | 3b91f476fbbecbd111f10efd0aae1df8eed5d667 (diff) | |
parent | b3e3567544dc2b41e1bcc89157b977cf12ef2efb (diff) | |
download | numpy-1596415c32f6008fcacc14a3a5394787aeb44265.tar.gz |
Merge branch 'main' into array-api
Diffstat (limited to 'tools/ci/push_docs_to_repo.py')
-rwxr-xr-x | tools/ci/push_docs_to_repo.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/ci/push_docs_to_repo.py b/tools/ci/push_docs_to_repo.py index ae5305484..058f748ec 100755 --- a/tools/ci/push_docs_to_repo.py +++ b/tools/ci/push_docs_to_repo.py @@ -45,6 +45,9 @@ workdir = tempfile.mkdtemp() os.chdir(workdir) run(['git', 'init']) +# ensure the working branch is called "main" +# (`--initial-branch=main` appared to have failed on older git versions): +run(['git', 'checkout', '-b', 'main']) run(['git', 'remote', 'add', 'origin', args.remote]) run(['git', 'config', '--local', 'user.name', args.committer]) run(['git', 'config', '--local', 'user.email', args.email]) @@ -56,7 +59,7 @@ run(['git', 'commit', '--allow-empty', '-m', args.message], stdout=False) print('- uploading as %s <%s>' % (args.committer, args.email)) if args.force: - run(['git', 'push', 'origin', 'master', '--force']) + run(['git', 'push', 'origin', 'main', '--force']) else: print('\n!! No `--force` argument specified; aborting') print('!! Before enabling that flag, make sure you know what it does\n') |