diff --git a/src/git_flow/command/tag.py b/src/git_flow/command/tag.py index 3d3d862..2fcb475 100644 --- a/src/git_flow/command/tag.py +++ b/src/git_flow/command/tag.py @@ -91,7 +91,7 @@ class TagCommand(Command): tag = Git.get_current_tag() or f"v0.0.0-{branch}" until_dash = tag.index("-") if "-" in tag else None - suffix = tag[until_dash + 1 :] if until_dash is not None else "" + suffix = tag[until_dash:] if until_dash is not None else "" [major, minor, patch] = map(int, tag[1:until_dash].split(".")) if increment == SEMVER_MAJOR: @@ -104,4 +104,4 @@ class TagCommand(Command): elif increment == SEMVER_PATCH: patch += 1 - return None if increment == SEMVER_SKIP else f"v{major}.{minor}.{patch}-{suffix}" + return None if increment == SEMVER_SKIP else f"v{major}.{minor}.{patch}{suffix}"