File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,31 @@ And check the package version generated (see `command help <https://setuptools-g
104104 $ setuptools-git-versioning
105105 0.0.1
106106
107+ When add a git tag:
108+
109+ .. code :: bash
110+
111+ $ git add .
112+ $ git commit -m " Test tagged"
113+ $ git tag 1.2.3
114+
115+ And now version is based on git tag:
116+
117+ .. code :: bash
118+
119+ $ setuptools-git-versioning
120+ 1.2.3
121+
122+ $ echo 1 > uncommitted.change
123+ $ git add .
124+ $ setuptools-git-versioning
125+ 1.2.3.post0+git.d2bc6516.dirty
126+
127+ $ git commit -m " Test committed"
128+ $ setuptools-git-versioning
129+ 1.2.3.post1+git.d452190b
130+
131+
107132 ``setup.py ``
108133~~~~~~~~~~~~
109134
@@ -122,19 +147,4 @@ and then add new argument ``setuptools_git_versioning`` with config options:
122147 setup_requires = [" setuptools-git-versioning>=3.0,<4" ],
123148 )
124149
125- And check the package version generated (see `command help <https://setuptools-git-versioning.readthedocs.io/en/stable/command.html >`_):
126-
127- .. code :: bash
128-
129- $ python setup.py --version
130- 0.0.1
131-
132- # or
133-
134- $ python -m setuptools_git_versioning
135- 0.0.1
136-
137- # or
138-
139- $ setuptools-git-versioning
140- 0.0.1
150+ Commands are the same as above, plus ``python -m setup.py `` returns the same version.
You can’t perform that action at this time.
0 commit comments