summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-03-07 15:56:00 -0700
committerGitHub <noreply@github.com>2021-03-07 15:56:00 -0700
commit0cea1d9b585ebe9895c898c60f05572840579c89 (patch)
treeeed854906503d432e3e03117a8e946f21dd746aa
parent516a0ce17153ffd3153bc9427869bff2b58e329a (diff)
parent5631e8ee5aeea8fe645ee46aa12f76ecff1badf2 (diff)
downloadnumpy-0cea1d9b585ebe9895c898c60f05572840579c89.tar.gz
Merge pull request #18572 from seberg/ci-devdoc-branch
CI: Do not pass original branch name to `git branch -m main`
-rwxr-xr-xtools/ci/push_docs_to_repo.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/ci/push_docs_to_repo.py b/tools/ci/push_docs_to_repo.py
index 00c4f7074..058f748ec 100755
--- a/tools/ci/push_docs_to_repo.py
+++ b/tools/ci/push_docs_to_repo.py
@@ -45,7 +45,9 @@ workdir = tempfile.mkdtemp()
os.chdir(workdir)
run(['git', 'init'])
-run(['git', 'branch', '-m', 'master', 'main'])
+# 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])