File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed
Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 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 >`_.
Original file line number Diff line number Diff line change 1+ Common issues
2+ --------------
3+
4+ .. toctree ::
5+ :maxdepth: 1
6+
7+ all_dirty
8+ wrong_tag
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments