Blob Blame History Raw
.TH DUNAMAI\-FROM\-ANY "1" "December 2022" "" "User Commands"
.SH NAME
.B dunamai\ from\ any
\(en
generate version from any detected VCS
.SH SYNOPSIS
.B dunamai\ from\ any
.RB [ \-h ]
.RB [ \-\-metadata ]
.RB [ \-\-no\-metadata ]
.RB [ \-\-dirty ]
.RB [ \-\-tagged\-metadata ]
.RB [ \-\-pattern\ \fIPATTERN ]
.RB [ \-\-format\ \fIFORMAT ]
.RB [ \-\-style\ { pep440 , semver , pvp }]
.RB [ \-\-latest\-tag ]
.RB [ \-\-strict ]
.RB [ \-\-debug ]
.RB [ \-\-bump ]
.RB [ \-\-full\-commit ]
.RB [ \-\-tag\-branch\ \fITAG_BRANCH ]
.RB [ \-\-tag\-dir\ \fITAG_DIR ]
.SH OPTIONS
.SS "OPTIONAL ARGUMENTS"
.TP
.B \-h\fR,\ \fB\-\-help
Show a help message and exit
.TP
.B \-\-metadata
Always include metadata.
Ignored when
.B \-\-format
is used
(default:
.BR None )
.TP
.B \-\-no\-metadata
Never include metadata.
Ignored when
.B \-\-format
is used
(default:
.BR None )
.TP
.B \-\-dirty
Include dirty flag if applicable.
Ignored when
.B \-\-format
is used
(default:
.BR False )
.TP
.B \-\-tagged\-metadata
Include tagged metadata if applicable.
Ignored when
.B \-\-format is used
(default:
.BR False )
.TP
.B \-\-pattern\ \fIPATTERN
Regular expression matched against the version source.
This must contain one capture group named
.B base
corresponding to the release segment of the source.
Optionally, it may contain another two groups named
.B stage
and
.B revision
corresponding to a prerelease type (such as
.RB \(oq alpha \(cq
or
.RB \(oq rc \(cq)
and number (such as in
.RB \(oq alpha\-2 \(cq
or
.RB \(oq rc3 \(cq).
It may also contain a group named
.B 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
.B epoch
for the PEP 440 concept.
If the
.B base
group is not present, then instead this will be interpreted
as a named preset, which may be one of the following:
.BR default ,
.B default\-unprefixed
(default:
.ad l
.B (?x)
.B (?# ignore whitespace)
.B ^v((?P<epoch>\\\\d+)!)?(?P<base>\\\\d+(\\\\.\\\\d+)*)
.B (?# v1.2.3 or v1!2000.1.2)
.B ([-._]?((?P<stage>[a-zA-Z]+)[- ._]?(?P<revision>\\\\d+)?))?\:
.B (?# b0)
.B (\\\\+(?P<tagged_metadata>.+))?$
.B (?#
.BR +linux) )
.ad
.TP
.B \-\-format\ \fIFORMAT
Custom output format.
Available substitutions:
.BR {base} ,
.BR {stage} ,
.BR {revision} ,
.BR {distance} ,
.BR {commit} ,
.BR {dirty} ,
.BR {tagged_metadata} ,
.BR {epoch} ,
.BR {branch} ,
.BR {branch_escaped} ,
.BR {timestamp}
(default:
.BR None )
.TP
.B \-\-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\(cqs rules
(default:
.BR None )
.TP
.B \-\-latest\-tag
Only inspect the latest tag on the latest tagged commit for a pattern match
(default:
.BR False )
.TP
.B \-\-strict
When there are no tags, fail instead of falling back to
.B 0.0.0
(default:
.BR False )
.TP
.B \-\-debug
Display additional information on stderr for troubleshooting
(default:
.BR False )
.TP
.B \-\-bump
Increment the last part of the version
.B base
by 1, unless the
.B stage
is set, in which case increment the
.B revision
by 1 or set it to a default of
.B 2
if there was no
.BR revision .
Does nothing when on a commit with a version tag.
(default:
.BR False )
.TP
.B \-\-full\-commit
Get the full commit hash instead of the short form
.RI ( only :
Git, Mercurial)
(default:
.BR False )
.TP
.B \-\-tag\-branch\ \fITAG_BRANCH
Branch on which to find tags, if different than the current branch
.RI ( only :
Git)
(default:
.BR None )
.TP
.B \-\-tag\-dir\ \fITAG_DIR
Location of tags relative to the root
.RI ( only :
Subversion)
(default:
.BR tags )
.SH "SEE ALSO"
.BR dunamai\-from\-bazaar (1),
.BR dunamai\-from\-darcs (1),
.BR dunamai\-from\-fossil (1),
.BR dunamai\-from\-git (1),
.BR dunamai\-from\-mercurial (1),
.BR dunamai\-from\-pijul (1),
.BR dunamai\-from\-subversion (1)
.P
.BR dunamai\-from (1),
.BR dunamai (1)
.P
.BR bzr (1),
.BR darcs (1),
.BR fossil (1),
.BR git (1),
.BR hg (1),
.BR svn (1)