Skip to content

Commit

Permalink
docs: better description for tag_format usage
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardcooke53 committed Jul 17, 2023
1 parent 0244086 commit 2129b72
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,22 @@ From the `Semantic Versioning Specification`_:
""""""""""""""""""""
Specify the format to be used for the Git tag that will be added to the repo during
a release invoked via :ref:`cmd-version`. The format string must include the mandatory
format keys below, otherwise an exception will be thrown. It *may* include any of the
optional format keys, in which case the contents described will be formatted into the
specified location in the Git tag that is created.
a release invoked via :ref:`cmd-version`. The format string is a regular expression,
which also must include the format keys below, otherwise an exception will be thrown.
It *may* include any of the optional format keys, in which case the contents
described will be formatted into the specified location in the Git tag that is created.
For example, ``"(dev|stg|prod)-v{version}"`` is a valid ``tag_format`` matching tags such
as:
- ``dev-v1.2.3``
- ``stg-v0.1.0-rc.1``
- ``prod-v2.0.0+20230701``
This format will also be used for parsing tags already present in the repository into
semantic versions, so unexpected behaviour can occur if the tag format changes at some
point in the repository's history.
semantic versions; therefore if the tag format changes at some point in the
repository's history, historic versions that no longer match this pattern will not be
considered as versions.
================ ========= ========
Format Key Mandatory Contents
Expand All @@ -280,6 +288,8 @@ Format Key Mandatory Contents
``2.1.0-alpha.1+build.1234``
================ ========= ========
Tags which do not match this format will not be considered as versions of your project.
**Default:** ``"v{version}"``
.. _config-version-variables:
Expand Down

0 comments on commit 2129b72

Please sign in to comment.