Skip to content

Commit 62a9f6b

Browse files
committed
Update README
1 parent d452190 commit 62a9f6b

1 file changed

Lines changed: 26 additions & 16 deletions

File tree

README.rst

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)