@@ -129,15 +129,17 @@ looks like this:
129129.. code :: toml
130130
131131 [tool.versioningit.format]
132-
133132 # Format used when there have been commits since the most recent tag:
134133 distance = "{base_version}.post{distance}+{vcs}{rev}"
134+ # Example formatted version: 1.2.3.post42+ge174a1f
135135
136136 # Format used when there are uncommitted changes:
137137 dirty = "{base_version}+d{build_date:%Y%m%d}"
138+ # Example formatted version: 1.2.3+d20230922
138139
139140 # Format used when there are both commits and uncommitted changes:
140141 distance-dirty = "{base_version}.post{distance}+{vcs}{rev}.d{build_date:%Y%m%d}"
142+ # Example formatted version: 1.2.3.post42+ge174a1f.d20230922
141143
142144 Other format configurations of interest include:
143145
@@ -150,26 +152,41 @@ Other format configurations of interest include:
150152
151153 [tool.versioningit.format]
152154 distance = "{next_version}.dev{distance}+{vcs}{rev}"
155+ # Example formatted version: 1.2.4.dev42+ge174a1f
156+
153157 dirty = "{base_version}+d{build_date:%Y%m%d}"
158+ # Example formatted version: 1.2.3+d20230922
159+
154160 distance-dirty = "{next_version}.dev{distance}+{vcs}{rev}.d{build_date:%Y%m%d}"
161+ # Example formatted version: 1.2.4.dev42+ge174a1f.d20230922
155162
156163 - The format used by versioneer _:
157164
158165 .. code :: toml
159166
160167 [tool.versioningit.format]
161168 distance = "{base_version}+{distance}.{vcs}{rev}"
169+ # Example formatted version: 1.2.3+42.ge174a1f
170+
162171 dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
172+ # Example formatted version: 1.2.3+42.ge174a1f.dirty
173+
163174 distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
175+ # Example formatted version: 1.2.3+42.ge174a1f.dirty
164176
165177 - The format used by vcversioner _:
166178
167179 .. code :: toml
168180
169181 [tool.versioningit.format]
170182 distance = "{base_version}.post{distance}"
183+ # Example formatted version: 1.2.3.post42
184+
171185 dirty = "{base_version}"
186+ # Example formatted version: 1.2.3
187+
172188 distance-dirty = "{base_version}.post{distance}"
189+ # Example formatted version: 1.2.3.post42
173190
174191 .. _setuptools_scm : https://github.com/pypa/setuptools_scm
175192.. _versioneer : https://github.com/python-versioneer/python-versioneer
0 commit comments