Git Versioning for Python Project
A biased git versioning tool. It versions as following:
-
On
v*tag: version as tag if notstickyi.e.
0.1.0 -
On
mainormasterbranch: version as rci.e.
0.1.0-rc{BUILD_NUMBER}+{GIT_COMMIT_SHORT_SHA} -
Others: version as dev
i.e.
0.1.0-dev{BUILD_NUMBER}+{GIT_COMMIT_SHORT_SHA}
If env VERSIONING_GIT_BRANCH is set, it will be used instead of git branch --show-current.
Usage
It currently support setuptools, hatch and poetry.
setuptools
setuptools.setup(
version="0.1.0",
setup_requires=["gitv"]
)
hatch
[build-system]
requires = ["hatchling", "gitv"]
[project]
dynamic = ["version"]
[tool.hatch.version]
version = "0.1.0"
source = "vcs"
poetry
[build-system]
requires = ["poetry-core", "gitv"]
[tool.poetry]
version = "0.1.0"
Metadata
Release files for gitv 2.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitv-2.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / gitv-2.2.2-py3-none-any.whl
| Download URL | gitv-2.2.2-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af8a22ffc35be13075894bc4e7d44555a17b29b40871743c6a7c925d6912b37a
|
|
BLAKE2b-256 checksum How to use checksums |
9d4b8adcac1bf82d600cc5914f290512f7389655c84b2c94b7d0f1a2bfdccdeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|