Skip to content

Commit

Permalink
Added command line flag for tagged_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusvniekerk authored Dec 2, 2020
1 parent 813df03 commit f1b6d10
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion dunamai/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"dest": "dirty",
"help": "Include dirty flag if applicable",
},
{
"triggers": ["--tagged-metadata"],
"action": "store_true",
"dest": "tagged_metadata",
"help": "Include tagged metadata if applicable",
},
{
"triggers": ["--pattern"],
"default": _VERSION_PATTERN,
Expand Down Expand Up @@ -202,9 +208,10 @@ def from_vcs(
tag_dir: str,
debug: bool,
bump: bool,
tagged_metadata: bool,
) -> None:
version = Version.from_vcs(vcs, pattern, latest_tag, tag_dir)
print(version.serialize(metadata, dirty, format, style, bump))
print(version.serialize(metadata, dirty, format, style, bump, tagged_metadata=tagged_metadata))
if debug:
print("# Matched tag: {}".format(version._matched_tag), file=sys.stderr)
print("# Newer unmatched tags: {}".format(version._newer_unmatched_tags), file=sys.stderr)
Expand All @@ -226,6 +233,7 @@ def main() -> None:
tag_dir,
args.debug,
args.bump,
args.tagged_metadata,
)
elif args.command == "check":
version = from_stdin(args.version)
Expand Down

0 comments on commit f1b6d10

Please sign in to comment.