Skip to main content

Git Versioning for Python Project

A biased git versioning tool. It versions as following:

  • On v* tag: version as tag if not sticky

    i.e. 0.1.0

  • On main or master branch: version as rc

    i.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)

Table of built distributions (wheels) for gitv 2.2.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

2.2.2 This release

1 release file

2.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page