Your company here ā€” click to reach over 10,000 unique daily visitors

dunamai-from-any - Man Page

dunamai from any


usage: dunamai from any [-h] [--metadata] [--no-metadata] [--dirty]

[--ignore-untracked] [--tagged-metadata]

[--pattern PATTERN] [--pattern-prefix PATTERN_PREFIX] [--format FORMAT] [--style {pep440,semver,pvp}] [--latest-tag] [--strict] [--path PATH] [--debug] [--bump] [--full-commit] [--tag-branch TAG_BRANCH] [--tag-dir TAG_DIR]

Generate version from any detected VCS


-h, --help

show this help message and exit


Always include metadata. Ignored when --format is used (default: None)


Never include metadata. Ignored when --format is used (default: None)


Include dirty flag if applicable. Ignored when --format is used (default: False)


Ignore untracked files when determining whether the repository is dirty (only: Git) (default: False)


Include tagged metadata if applicable. Ignored when --format is used (default: False)

--pattern PATTERN

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed` (default: (?x) (?# ignore whitespace) ^v((?P<epoch>\d+)!)?(?P<base>\d+(\.\d+)*) (?# v1.2.3 or v1!2000.1.2) ([-._]?((?P<stage>[a-zA-Z]+)[- ._]?(?P<revision>\d+)?))? (?# b0) (\+(?P<tagged_metadata>.+))?$ (?# +linux))

--pattern-prefix PATTERN_PREFIX

Insert this after the pattern's start anchor (`^`). (default: None)

--format FORMAT

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp} (default: None)

--style {pep440,semver,pvp}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules (default: None)


Only inspect the latest tag on the latest tagged commit for a pattern match (default: False)


Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0 (default: False)

--path PATH

Directory to inspect, if not the current working directory (default: None)


Display additional information on stderr for troubleshooting (default: False)


Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag. (default: False)


Get the full commit hash instead of the short form (only: Git, Mercurial) (default: False)

--tag-branch TAG_BRANCH

Branch on which to find tags, if different than the current branch (only: Git) (default: None)

--tag-dir TAG_DIR

Location of tags relative to the root (only: Subversion) (default: tags)


July 2024 dunamai from any 1.21.2