@@ -19,13 +19,11 @@ For example, current repo state is:
1919 |
2020 ...
2121
22- **And there are no tags in the current branch ** (``dev ``), **all
23- of them are placed in the ** ``master `` **branch. **
24-
2522 By default, when you try to get current version, you'll receive some
26- initial value (see :ref: `starting-version-option ` option).
23+ initial value (see :ref: `starting-version-option ` option),
24+ because there are no tags in the ``dev `` branch.
2725
28- If you want to get synchronized version numbers in both on the branches,
26+ If you want to get synchronized version numbers in both `` master `` and `` dev `` branches,
2927you can create a function in some file (for example, in the
3028``mypkg/version.py `` file):
3129
@@ -59,7 +57,7 @@ Then place it in both the branches and update your ``setup.py`` or ``pyproject.t
5957 enabled = true
6058 version_callback = "mypkg.version:get_version"
6159
62- When you'll try to get current version in non-master branch, the result
60+ When you'll try to get current version in ** any ** branch, the result
6361of executing this function will be returned instead of latest tag
6462number.
6563
@@ -96,8 +94,9 @@ If a value of this option is not a function but just str, it also could be used:
9694 enabled = true
9795 version_callback = "mypkg:__version__"
9896
99- **Please take into account that version_callback is ignored if tag
100- is present **
97+ **Please take into account that any tag in the branch is completely ignored if version_callback
98+ is set **.
99+ You should explicitly call ``setuptools_git_versioning.version_from_git `` function in the callback.
101100
102101
103102See also
0 commit comments