Skip to content

Commit

Permalink
Use Versioned.semantic_increment to identify relative tag names
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Aug 5, 2024
1 parent aa3f142 commit 5e6d096
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import typer
from coherent.build import bootstrap
from jaraco.vcs import repo
from jaraco.versioning import semver
from jaraco.versioning import Versioned, semver


app = typer.Typer()
Expand Down Expand Up @@ -44,7 +44,7 @@ def tag(
context: typer.Context,
location: Annotated[str, typer.Option('-C', help='Path to repository.')] = '.',
) -> None:
if tag_name in ('major', 'minor', 'patch'):
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])

Expand Down

0 comments on commit 5e6d096

Please sign in to comment.