dunamai-from-fossil - Man Page

dunamai from fossil


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

[--tagged-metadata] [--pattern PATTERN]

[--format FORMAT] [--style {pep440,semver,pvp}] [--latest-tag] [--strict] [--path PATH] [--debug] [--bump]

Generate version from Fossil


-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)


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))

--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)


February 2024 dunamai from fossil 1.19.2