Skip to content

Commit

Permalink
copier-update: add --git-protocol option
Browse files Browse the repository at this point in the history
To support https git push, which is useful when
authenticating with `gh auth setup-git`
  • Loading branch information
sbidoul committed May 1, 2024
1 parent a3b7060 commit 3b31d9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/copier_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,21 @@ def _fix_copier_answers():
show_default=True,
)
@click.option("--skip-ci/--no-skip-ci", default=False)
@click.option("--git-protocol", default="git", show_default=True)
def main(
org: str,
repos: str,
branches: str,
git_user_name: str,
git_user_email: str,
skip_ci: bool,
git_protocol: str,
) -> None:
for repo, branch in _iterate_repos_and_branches(repos, branches):
try:
with temporary_clone(org_name=org, project_name=repo, branch=branch):
with temporary_clone(
org_name=org, project_name=repo, branch=branch, protocol=git_protocol
):
print("=" * 10, repo, branch, "=" * 10)
if git_user_name:
subprocess.check_call(
Expand Down

0 comments on commit 3b31d9e

Please sign in to comment.