Skip to main content

A biased Git versioning tool for Python project.

Project description

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"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitv-2.2.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

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

Hashes for gitv-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af8a22ffc35be13075894bc4e7d44555a17b29b40871743c6a7c925d6912b37a
MD5 baa5aed5a58a7d0b887228b1d415f63a
BLAKE2b-256 9d4b8adcac1bf82d600cc5914f290512f7389655c84b2c94b7d0f1a2bfdccdeb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page