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"
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitv-2.2.2-py3-none-any.whl.
File metadata
- Download URL: gitv-2.2.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af8a22ffc35be13075894bc4e7d44555a17b29b40871743c6a7c925d6912b37a
|
|
| MD5 |
baa5aed5a58a7d0b887228b1d415f63a
|
|
| BLAKE2b-256 |
9d4b8adcac1bf82d600cc5914f290512f7389655c84b2c94b7d0f1a2bfdccdeb
|