Skip to content

Commit

Permalink
Rename tag_name parameter to kind_or_name
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Aug 6, 2024
1 parent 5e6d096 commit 066882b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ def build() -> None:

@app.command(context_settings=dict(allow_extra_args=True))
def tag(
tag_name: str,
kind_or_name: str,
context: typer.Context,
location: Annotated[str, typer.Option('-C', help='Path to repository.')] = '.',
) -> None:
if tag_name in Versioned.semantic_increment:
tag_name = semver(repo(location).get_next_version(tag_name))
subprocess.run(['git', '-C', location, 'tag', '-a', tag_name, *context.args])
if kind_or_name in Versioned.semantic_increment:
name = semver(repo(location).get_next_version(kind_or_name))
else:
name = kind_or_name
subprocess.run(['git', '-C', location, 'tag', '-a', name, *context.args])


if __name__ == '__main__':
Expand Down

0 comments on commit 066882b

Please sign in to comment.