1DUNAMAI(1) User Commands DUNAMAI(1)
2
3
4
6 dunamai - dunamai from any
7
9 usage: dunamai from any [-h] [--metadata] [--no-metadata] [--dirty]
10
11 [--tagged-metadata] [--pattern PATTERN]
12 [--format FORMAT] [--style {pep440,semver,pvp}] [--latest-tag]
13 [--strict] [--path PATH] [--debug] [--bump] [--full-commit]
14 [--tag-branch TAG_BRANCH] [--tag-dir TAG_DIR]
15
16 Generate version from any detected VCS
17
18 options:
19 -h, --help
20 show this help message and exit
21
22 --metadata
23 Always include metadata. Ignored when --format is used (default:
24 None)
25
26 --no-metadata
27 Never include metadata. Ignored when --format is used (default:
28 None)
29
30 --dirty
31 Include dirty flag if applicable. Ignored when --format is used
32 (default: False)
33
34 --tagged-metadata
35 Include tagged metadata if applicable. Ignored when --format is
36 used (default: False)
37
38 --pattern PATTERN
39 Regular expression matched against the version source. This
40 must contain one capture group named `base` corresponding to the
41 release segment of the source. Optionally, it may contain an‐
42 other two groups named `stage` and `revision` corresponding to a
43 prerelease type (such as 'alpha' or 'rc') and number (such as in
44 'alpha-2' or 'rc3'). It may also contain a group named
45 `tagged_metadata` corresponding to extra metadata after the main
46 part of the version (typically after a plus sign). There may
47 also be a group named `epoch` for the PEP 440 concept. If the
48 `base` group is not present, then instead this will be inter‐
49 preted as a named preset, which may be one of the following:
50 `default`, `default-unprefixed` (default: (?x) (?# ignore white‐
51 space) ^v((?P<epoch>\d+)!)?(?P<base>\d+(\.\d+)*) (?# v1.2.3 or
52 v1!2000.1.2) ([-._]?((?P<stage>[a-zA-Z]+)[- ._]?(?P<revi‐
53 sion>\d+)?))? (?# b0) (\+(?P<tagged_metadata>.+))?$ (?# +linux))
54
55 --format FORMAT
56 Custom output format. Available substitutions: {base}, {stage},
57 {revision}, {distance}, {commit}, {dirty}, {tagged_metadata},
58 {epoch}, {branch}, {branch_escaped}, {timestamp} (default: None)
59
60 --style {pep440,semver,pvp}
61 Preconfigured output format. Will default to PEP 440 if not set
62 and no custom format given. If you specify both a style and a
63 custom format, then the format will be validated against the
64 style's rules (default: None)
65
66 --latest-tag
67 Only inspect the latest tag on the latest tagged commit for a
68 pattern match (default: False)
69
70 --strict
71 Elevate warnings to errors. When there are no tags, fail instead
72 of falling back to 0.0.0 (default: False)
73
74 --path PATH
75 Directory to inspect, if not the current working directory (de‐
76 fault: None)
77
78 --debug
79 Display additional information on stderr for troubleshooting
80 (default: False)
81
82 --bump Increment the last part of the version `base` by 1, unless the
83 `stage` is set, in which case increment the `revision` by 1 or
84 set it to a default of 2 if there was no `revision` Does nothing
85 when on a commit with a version tag. (default: False)
86
87 --full-commit
88 Get the full commit hash instead of the short form (only: Git,
89 Mercurial) (default: False)
90
91 --tag-branch TAG_BRANCH
92 Branch on which to find tags, if different than the current
93 branch (only: Git) (default: None)
94
95 --tag-dir TAG_DIR
96 Location of tags relative to the root (only: Subversion) (de‐
97 fault: tags)
98
99
100
101dunamai from any 1.19.0 October 2023 DUNAMAI(1)