Merged in bugfix/tag-name-scheme (pull request #43)
bugfix: tag name scheme Approved-by: Jonathan Teran
This commit is contained in:
@@ -91,7 +91,7 @@ class TagCommand(Command):
|
|||||||
tag = Git.get_current_tag() or f"v0.0.0-{branch}"
|
tag = Git.get_current_tag() or f"v0.0.0-{branch}"
|
||||||
|
|
||||||
until_dash = tag.index("-") if "-" in tag else None
|
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("."))
|
[major, minor, patch] = map(int, tag[1:until_dash].split("."))
|
||||||
|
|
||||||
if increment == SEMVER_MAJOR:
|
if increment == SEMVER_MAJOR:
|
||||||
@@ -104,4 +104,4 @@ class TagCommand(Command):
|
|||||||
elif increment == SEMVER_PATCH:
|
elif increment == SEMVER_PATCH:
|
||||||
patch += 1
|
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}"
|
||||||
|
|||||||
Reference in New Issue
Block a user