Skip to main content

​base version, ​latest Git commit ID, and ​latest update date.

Project description

hatch-bgd

​base version, ​latest Git commit ID, and ​latest update date


This provides a plugin for Hatch that automatically generates the version string in the format "base-version+git-commit-id.date" (e.g. 1.0.0+g4926eb8.d20250318)

Table of Contents

Global dependency

Ensure hatch-bgd is defined within the build-system.requires field in your pyproject.toml file.

[build-system]
requires = ["hatchling", "hatch-bgd"]
build-backend = "hatchling.build"

Version source

The version source plugin name is bgd.

  • pyproject.toml

    [tool.hatch.version]
    source = "bgd"
    
  • hatch.toml

    [version]
    source = "bgd"
    

Version source options

Option Type Description
base-version str -
build-type str When selecting between dev and release, if dev is chosen, a local version identifier in the format f"{latest Git commit ID}.{latest update date}" will be automatically appended after the base-version.

Display version

hatch version will print the version to the terminal without modifying the source directory.

$ hatch version
1.0.0+g4926eb8.d20250318

License

hatch-bgd is distributed under the terms of the MIT license.

Project details


Download files

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

Source Distribution

hatch_bgd-0.0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

hatch_bgd-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file hatch_bgd-0.0.1.tar.gz.

File metadata

  • Download URL: hatch_bgd-0.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hatch_bgd-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4daf8d99efa2df571145ff3528c479201d127fb34bc2abb448d1c32f6106ee66
MD5 330320c3ca61ba68ec289d0a1e5d744a
BLAKE2b-256 d39de17db60dacc6b6f48a9f815f88d3425e699ca8472a261c6157c85375ee25

See more details on using hashes here.

File details

Details for the file hatch_bgd-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: hatch_bgd-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hatch_bgd-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d5adc1ad0eda5206c324a83f47cbc855b8cf1913e1772364917ebfff7371d81
MD5 65a6a74ffb753f7556351075aa6177e5
BLAKE2b-256 c5229959d943811ebeb69dc7a4e986aa87d4d1302abd83d50324d4e4b32d2e76

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