From 16d19acf9fc208f51610792ec041c60adac24d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Mon, 13 May 2019 15:49:22 +0200 Subject: [PATCH 1/2] Adding some gitignore rules Avoid to track swap file, building artefacts, cache and compiled. --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index b057de5..79559be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,12 @@ /.cache/ /.tox/ +*.egg-info/ +Pipfile +*.pyc +*.pya +build/ +*__pycache__* +*.eggs/ +*.swa +*.swp +*~ From 355f7c579a0a5c76b71bf19e38ff7b6e65816e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Mon, 13 May 2019 15:59:55 +0200 Subject: [PATCH 2/2] Update documentation with install and cli use --- README.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.rst b/README.rst index 95da5ac..42c09ef 100644 --- a/README.rst +++ b/README.rst @@ -3,6 +3,14 @@ setuptools-git-version *Automatically set package version from Git.* +Install +------- + +Install ``setuptools-git-version`` from pypi: + +.. code-block:: shell + pip install setuptools-git-version + Introduction ------------ @@ -29,6 +37,13 @@ this package allows to extract it from the underlying Git repository: Please ensure that your git repository has at least one `annotated tag `_, as ``setuptools-git-version`` will uses tags to determine your current git version. +Also you can use ``setuptools-git-version`` as a CLI command to retrieve the version like this: + +.. code-block:: shell + $ # go to your project directory + $ setuptools-git-version + 1.0.4.5+b1afbd9 + Fields ------ ``setuptools-git-version`` provides three fields as options for the ``version_format`` string: