table of contents
| DUNAMAI(1) | Dunamai | DUNAMAI(1) |
NAME¶
dunamai
SYNOPSIS¶
dunamai [-h] {from,check} ...
DESCRIPTION¶
Generate dynamic versions
POSITIONAL ARGUMENTS¶
dunamai from¶
Generate version from a particular VCS
usage: dunamai from [-h]
{any,git,mercurial,darcs,subversion,bazaar,fossil,pijul}
...
Generate version from a particular VCS
dunamai from any¶
Generate version from any detected VCS
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]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH] [--tag-branch TAG_BRANCH]
[--tag-dir TAG_DIR]
Generate version from any detected VCS
options:
- --metadata
- Always include metadata. Ignored when --format is used
- --no-metadata
- Never include metadata. Ignored when --format is used
- --dirty
- Include dirty flag if applicable. Ignored when --format is used
- --ignore-untracked
- Ignore untracked files when determining whether the repository is dirty (only: Git)
- --tagged-metadata
- Include tagged metadata if applicable. Ignored when --format is used
- --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`
- --pattern-prefix PATTERN_PREFIX
- Insert this after the pattern's start anchor (`^`).
- --format FORMAT
- Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}
- --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
- --latest-tag
- Only inspect the latest tag on the latest tagged commit for a pattern match
- --strict
- Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0
- --path PATH
- Directory to inspect, if not the current working directory
- --debug
- Display additional information on stderr for troubleshooting
- --bump
- 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.
- --full-commit
- Get the full commit hash instead of the short form (only: Git, Mercurial)
- --commit-length COMMIT_LENGTH
- Use this many characters from the start of the full commit hash
- --commit-prefix COMMIT_PREFIX
- Add this prefix when serializing commit IDs
- --escape-with ESCAPE_WITH
- When escaping, replace with this substitution. The default is simply to remove invalid characters.
- --tag-branch TAG_BRANCH
- Branch on which to find tags, if different than the current branch (only: Git)
- --tag-dir TAG_DIR
- Location of tags relative to the root (only: Subversion)
dunamai from git¶
Generate version from Git
usage: dunamai from git [-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]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH] [--tag-branch TAG_BRANCH]
Generate version from Git
options:
- --metadata
- Always include metadata. Ignored when --format is used
- --no-metadata
- Never include metadata. Ignored when --format is used
- --dirty
- Include dirty flag if applicable. Ignored when --format is used
- --ignore-untracked
- Ignore untracked files when determining whether the repository is dirty (only: Git)
- --tagged-metadata
- Include tagged metadata if applicable. Ignored when --format is used
- --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`
- --pattern-prefix PATTERN_PREFIX
- Insert this after the pattern's start anchor (`^`).
- --format FORMAT
- Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}
- --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
- --latest-tag
- Only inspect the latest tag on the latest tagged commit for a pattern match
- --strict
- Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0
- --path PATH
- Directory to inspect, if not the current working directory
- --debug
- Display additional information on stderr for troubleshooting
- --bump
- 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.
- --full-commit
- Get the full commit hash instead of the short form (only: Git, Mercurial)
- --commit-length COMMIT_LENGTH
- Use this many characters from the start of the full commit hash
- --commit-prefix COMMIT_PREFIX
- Add this prefix when serializing commit IDs
- --escape-with ESCAPE_WITH
- When escaping, replace with this substitution. The default is simply to remove invalid characters.
- --tag-branch TAG_BRANCH
- Branch on which to find tags, if different than the current branch (only: Git)
dunamai from mercurial¶
Generate version from Mercurial
usage: dunamai from mercurial [-h] [--metadata] [--no-metadata]
[--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX]
[--format FORMAT] [--style {pep440,semver,pvp}]
[--latest-tag] [--strict] [--path PATH]
[--debug] [--bump] [--full-commit]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]
Generate version from Mercurial
options:
- --metadata
- Always include metadata. Ignored when --format is used
- --no-metadata
- Never include metadata. Ignored when --format is used
- --dirty
- Include dirty flag if applicable. Ignored when --format is used
- --tagged-metadata
- Include tagged metadata if applicable. Ignored when --format is used
- --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`
- --pattern-prefix PATTERN_PREFIX
- Insert this after the pattern's start anchor (`^`).
- --format FORMAT
- Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}
- --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
- --latest-tag
- Only inspect the latest tag on the latest tagged commit for a pattern match
- --strict
- Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0
- --path PATH
- Directory to inspect, if not the current working directory
- --debug
- Display additional information on stderr for troubleshooting
- --bump
- 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.
- --full-commit
- Get the full commit hash instead of the short form (only: Git, Mercurial)
- --commit-length COMMIT_LENGTH
- Use this many characters from the start of the full commit hash
- --commit-prefix COMMIT_PREFIX
- Add this prefix when serializing commit IDs
- --escape-with ESCAPE_WITH
- When escaping, replace with this substitution. The default is simply to remove invalid characters.
dunamai from darcs¶
Generate version from Darcs
usage: dunamai from darcs [-h] [--metadata] [--no-metadata]
[--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT]
[--style {pep440,semver,pvp}] [--latest-tag]
[--strict] [--path PATH] [--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]
Generate version from Darcs
options:
- --metadata
- Always include metadata. Ignored when --format is used
- --no-metadata
- Never include metadata. Ignored when --format is used
- --dirty
- Include dirty flag if applicable. Ignored when --format is used
- --tagged-metadata
- Include tagged metadata if applicable. Ignored when --format is used
- --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`
- --pattern-prefix PATTERN_PREFIX
- Insert this after the pattern's start anchor (`^`).
- --format FORMAT
- Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}
- --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
- --latest-tag
- Only inspect the latest tag on the latest tagged commit for a pattern match
- --strict
- Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0
- --path PATH
- Directory to inspect, if not the current working directory
- --debug
- Display additional information on stderr for troubleshooting
- --bump
- 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.
- --commit-length COMMIT_LENGTH
- Use this many characters from the start of the full commit hash
- --commit-prefix COMMIT_PREFIX
- Add this prefix when serializing commit IDs
- --escape-with ESCAPE_WITH
- When escaping, replace with this substitution. The default is simply to remove invalid characters.
dunamai from subversion¶
Generate version from Subversion
usage: dunamai from subversion [-h] [--metadata] [--no-metadata]
[--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX]
[--format FORMAT] [--style {pep440,semver,pvp}]
[--latest-tag] [--strict] [--path PATH]
[--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH] [--tag-dir TAG_DIR]
Generate version from Subversion
options:
- --metadata
- Always include metadata. Ignored when --format is used
- --no-metadata
- Never include metadata. Ignored when --format is used
- --dirty
- Include dirty flag if applicable. Ignored when --format is used
- --tagged-metadata
- Include tagged metadata if applicable. Ignored when --format is used
- --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`
- --pattern-prefix PATTERN_PREFIX
- Insert this after the pattern's start anchor (`^`).
- --format FORMAT
- Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}
- --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
- --latest-tag
- Only inspect the latest tag on the latest tagged commit for a pattern match
- --strict
- Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0
- --path PATH
- Directory to inspect, if not the current working directory
- --debug
- Display additional information on stderr for troubleshooting
- --bump
- 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.
- --commit-length COMMIT_LENGTH
- Use this many characters from the start of the full commit hash
- --commit-prefix COMMIT_PREFIX
- Add this prefix when serializing commit IDs
- --escape-with ESCAPE_WITH
- When escaping, replace with this substitution. The default is simply to remove invalid characters.
- --tag-dir TAG_DIR
- Location of tags relative to the root (only: Subversion)
dunamai from bazaar¶
Generate version from Bazaar
usage: dunamai from bazaar [-h] [--metadata] [--no-metadata]
[--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT]
[--style {pep440,semver,pvp}] [--latest-tag]
[--strict] [--path PATH] [--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]
Generate version from Bazaar
options:
- --metadata
- Always include metadata. Ignored when --format is used
- --no-metadata
- Never include metadata. Ignored when --format is used
- --dirty
- Include dirty flag if applicable. Ignored when --format is used
- --tagged-metadata
- Include tagged metadata if applicable. Ignored when --format is used
- --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`
- --pattern-prefix PATTERN_PREFIX
- Insert this after the pattern's start anchor (`^`).
- --format FORMAT
- Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}
- --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
- --latest-tag
- Only inspect the latest tag on the latest tagged commit for a pattern match
- --strict
- Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0
- --path PATH
- Directory to inspect, if not the current working directory
- --debug
- Display additional information on stderr for troubleshooting
- --bump
- 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.
- --commit-length COMMIT_LENGTH
- Use this many characters from the start of the full commit hash
- --commit-prefix COMMIT_PREFIX
- Add this prefix when serializing commit IDs
- --escape-with ESCAPE_WITH
- When escaping, replace with this substitution. The default is simply to remove invalid characters.
dunamai from fossil¶
Generate version from Fossil
usage: dunamai from fossil [-h] [--metadata] [--no-metadata]
[--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT]
[--style {pep440,semver,pvp}] [--latest-tag]
[--strict] [--path PATH] [--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]
Generate version from Fossil
options:
- --metadata
- Always include metadata. Ignored when --format is used
- --no-metadata
- Never include metadata. Ignored when --format is used
- --dirty
- Include dirty flag if applicable. Ignored when --format is used
- --tagged-metadata
- Include tagged metadata if applicable. Ignored when --format is used
- --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`
- --pattern-prefix PATTERN_PREFIX
- Insert this after the pattern's start anchor (`^`).
- --format FORMAT
- Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}
- --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
- --latest-tag
- Only inspect the latest tag on the latest tagged commit for a pattern match
- --strict
- Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0
- --path PATH
- Directory to inspect, if not the current working directory
- --debug
- Display additional information on stderr for troubleshooting
- --bump
- 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.
- --commit-length COMMIT_LENGTH
- Use this many characters from the start of the full commit hash
- --commit-prefix COMMIT_PREFIX
- Add this prefix when serializing commit IDs
- --escape-with ESCAPE_WITH
- When escaping, replace with this substitution. The default is simply to remove invalid characters.
dunamai from pijul¶
Generate version from Pijul
usage: dunamai from pijul [-h] [--metadata] [--no-metadata]
[--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT]
[--style {pep440,semver,pvp}] [--latest-tag]
[--strict] [--path PATH] [--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]
Generate version from Pijul
options:
- --metadata
- Always include metadata. Ignored when --format is used
- --no-metadata
- Never include metadata. Ignored when --format is used
- --dirty
- Include dirty flag if applicable. Ignored when --format is used
- --tagged-metadata
- Include tagged metadata if applicable. Ignored when --format is used
- --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`
- --pattern-prefix PATTERN_PREFIX
- Insert this after the pattern's start anchor (`^`).
- --format FORMAT
- Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}
- --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
- --latest-tag
- Only inspect the latest tag on the latest tagged commit for a pattern match
- --strict
- Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0
- --path PATH
- Directory to inspect, if not the current working directory
- --debug
- Display additional information on stderr for troubleshooting
- --bump
- 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.
- --commit-length COMMIT_LENGTH
- Use this many characters from the start of the full commit hash
- --commit-prefix COMMIT_PREFIX
- Add this prefix when serializing commit IDs
- --escape-with ESCAPE_WITH
- When escaping, replace with this substitution. The default is simply to remove invalid characters.
dunamai check¶
Check if a version is valid for a style
usage: dunamai check [-h] [--style {pep440,semver,pvp}] [version]
Check if a version is valid for a style
arguments:
- version
- Version to check; may be piped in
options:
- --style {pep440,semver,pvp}
- Style against which to check
AUTHOR¶
Matthew T. Kennerly (mtkennerly)
DISTRIBUTION¶
The latest version of dunamai may be downloaded from https://github.com/mtkennerly/dunamai
| 2025-07-04 | dunamai 1.25.0 |