Skip to content

Commit ce06e94

Browse files
committed
Restore common_issues docs entry
1 parent 52bec5a commit ce06e94

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

docs/common_issues/all_dirty.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. _all-dirty-issue:
2+
3+
Every version built by CI is ``dirty``
4+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5+
6+
This is usually caused by some files created by CI pipeline like build
7+
artifacts or test reports, e.g. ``dist/my_package.whl`` or
8+
``reports/unit.xml``. If these files are not mentioned in ``.gitignore`` file
9+
they will be recognized by git as untracked. Because of that
10+
``git status`` will report that you have **uncommitted (dirty) changes** in
11+
the index, so ``setuptools-git-versioning`` will detect current version
12+
as ``dirty``.
13+
14+
You should such files to the ``.gitignore`` file. In most the cases adding these lines solves the issue:
15+
16+
.. code:: gitignore
17+
18+
build/
19+
dist/
20+
eggs/
21+
*.egg*
22+
venv
23+
24+
See `full example <https://github.com/dolfinus/setuptools-git-versioning/blob/master/.gitignore>`_.

docs/common_issues/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Common issues
2+
--------------
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
all_dirty
8+
wrong_tag

docs/common_issues/wrong_tag.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. _wrong-tag-issue:
2+
3+
Wrong tag ordering/latest tag number detection
4+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5+
6+
This could be caused by some unusual way of creating tags in your repo.
7+
8+
Annotated tags
9+
^^^^^^^^^^^^^^
10+
11+
If you're using annotated tags in your git repo, please avoid creating them in non-chronological order.
12+
This can cause issues with detecting versions of existing commits.
13+
14+
Multiple tags on commit
15+
^^^^^^^^^^^^^^^^^^^^^^^
16+
17+
Please do not add multiple tags for the same commit.
18+
It is impossible to automatically determine which one is latest because of ambiguity -
19+
both tag and commit have a creation date, and it is not possible to sort tags by multiple columns.
20+
21+
See also
22+
^^^^^^^^
23+
- :ref:`sort-by-option` option

0 commit comments

Comments
 (0)