Skip to content

Commit

Permalink
Merge pull request #506 from bgurney-rh/create-release-alt-url
Browse files Browse the repository at this point in the history
create_release.py: Add option for alternate Git URL
  • Loading branch information
mulkieran authored Mar 6, 2024
2 parents bc95803 + 8044f31 commit d482454
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions release_management/create_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,12 @@ def tag_rust_library(namespace, name):
if namespace.no_release:
return

dry_run_caller(
"__main__._push_tag", lambda: _push_tag(repository.geturl(), tag)
push_git_url = (
repository.geturl() if namespace.git_repo is None else namespace.git_repo
)

dry_run_caller("__main__._push_tag", lambda: _push_tag(push_git_url, tag))

dry_run_caller(
"__main__.create_release",
lambda: create_release(
Expand Down Expand Up @@ -317,10 +319,12 @@ def tag_python_library(namespace, name):
if namespace.no_release:
return

dry_run_caller(
"__main__._push_tag", lambda: _push_tag(repository.geturl(), tag)
push_git_url = (
repository.geturl() if namespace.git_repo is None else namespace.git_repo
)

dry_run_caller("__main__._push_tag", lambda: _push_tag(push_git_url, tag))

changelog_url = get_changelog_url(repository.geturl(), get_branch())

dry_run_caller(
Expand Down Expand Up @@ -425,6 +429,12 @@ def _get_parser():
help="stop before pushing any changes to GitHub repo",
)

parser.add_argument(
"--git-repo",
dest="git_repo",
help="Use alternate Git repository URL for tag push",
)

subparsers = parser.add_subparsers(title="subcommands", required=True)

rust_subparser = subparsers.add_parser(
Expand Down

0 comments on commit d482454

Please sign in to comment.