summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2021-03-07 13:22:17 -0600
committerSebastian Berg <sebastian@sipsolutions.net>2021-03-07 13:22:17 -0600
commitf2dd5ab63fad36c0dd6b5e16cd7883ad25b98100 (patch)
tree4966e77b709c1a0ed213b1e04c26caff7074044c
parent4af35a75b313411753b037f040d0eaf234321c5b (diff)
downloadnumpy-f2dd5ab63fad36c0dd6b5e16cd7883ad25b98100.tar.gz
CI: Use `git branch -m` instead of `--initial-branch=main`
It seems the git in the CircleCI environment does not have the `--initial-branch` option that my local git has, hopefully `git branch -m` works fine.
-rwxr-xr-xtools/ci/push_docs_to_repo.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/ci/push_docs_to_repo.py b/tools/ci/push_docs_to_repo.py
index 555a918e4..00c4f7074 100755
--- a/tools/ci/push_docs_to_repo.py
+++ b/tools/ci/push_docs_to_repo.py
@@ -44,7 +44,8 @@ def run(cmd, stdout=True):
workdir = tempfile.mkdtemp()
os.chdir(workdir)
-run(['git', 'init', '--initial-branch=main'])
+run(['git', 'init'])
+run(['git', 'branch', '-m', 'master', 'main'])
run(['git', 'remote', 'add', 'origin', args.remote])
run(['git', 'config', '--local', 'user.name', args.committer])
run(['git', 'config', '--local', 'user.email', args.email])