Skip to content

Commit af47572

Browse files
committed
Add note about shallow clone #83
1 parent 533757b commit af47572

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

CHANGELOG.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ Changelog
55
----
66

77
.. changelog::
8-
:version: 1.13.3
8+
:version: 1.13.4
9+
10+
.. change::
11+
:tags: docs, feature
12+
:tickets: 83
13+
14+
Update documentation to mention shallow clone issues.
915

1016
.. change::
1117
:tags: general, feature

docs/command.rst

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _command:
22

33
Console command
4-
-----------------------------------
4+
---------------
55

66
Package contains script `setuptools-git-versioning` which can be used for calculating version number.\
77

@@ -92,6 +92,29 @@ This script is a wrapper for ``setuptools_git_versioning`` module, you can just
9292
9393
1.0.0
9494
95+
CI configuration
96+
----------------
97+
98+
By default, CI workflows use shallow clone of the repo to speed up clone process.
99+
But this leads to cloning repo without any tags, and thus generating version number like ``0.0.1``.
100+
101+
To avoid this, please use following settings:
102+
103+
.. code-block:: yaml
104+
:caption: Github Actions
105+
106+
steps:
107+
- name: Checkout code
108+
uses: actions/checkout@v3
109+
with:
110+
fetch-depth: 0
111+
112+
.. code-block:: yaml
113+
:caption: Gitlab CI
114+
115+
variables:
116+
GIT_DEPTH: 0
117+
95118
96119
Command help
97120
~~~~~~~~~~~~~

0 commit comments

Comments
 (0)