Hatch plugin for versioning with your preferred VCS
Project description
hatch-vcs
| CI/CD | |
| Package | |
| Meta |
This provides a plugin for Hatch that uses your preferred version control system (like Git) to determine project versions.
Table of Contents
Global dependency
Ensure hatch-vcs is defined within the build-system.requires field in your pyproject.toml file.
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
Version source
The version source plugin name is vcs.
-
pyproject.toml
[tool.hatch.version] source = "vcs"
-
hatch.toml
[version] source = "vcs"
Version source options
| Option | Type | Default | Description |
|---|---|---|---|
tag-pattern |
str |
see code | A regular expression used to extract the version part from VCS tags. The pattern needs to contain either a single match group, or a group named version, that captures the actual version information. |
fallback-version |
str |
The version that will be used if no other method for detecting the version is successful. If not specified, unsuccessful version detection will raise an error. | |
raw-options |
dict |
A table of setuptools-scm parameters that will override any of the options listed above. The write_to and write_to_template parameters are ignored. |
Build hook
The build hook plugin name is vcs.
-
pyproject.toml
[tool.hatch.build.hooks.vcs] -
hatch.toml
[build.hooks.vcs]
Build hook options
| Option | Type | Default | Description |
|---|---|---|---|
version-file |
str |
REQUIRED | The relative path to the file that gets updated with the current version. |
template |
str |
The template used to overwrite the version-file. See the code for the default template for each file extension. |
License
hatch-vcs 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
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 hatch_vcs-0.2.0.tar.gz.
File metadata
- Download URL: hatch_vcs-0.2.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9913d733b34eec9bb0345d0626ca32165a4ad2de15d1ce643c36d09ca908abff
|
|
| MD5 |
e56b6d0c05cfb9b59d493c67f94d6e48
|
|
| BLAKE2b-256 |
ac13b3d83564c0cc0f1d45b4ea2a78b87b383a8165797613fedf11f1a7e49b48
|
File details
Details for the file hatch_vcs-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: hatch_vcs-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86432a0dd49acae0e69e14f285667693fcd31d9869ca21634520acc30d482f07
|
|
| MD5 |
b862c74956aa01bc81233f99e12bfddb
|
|
| BLAKE2b-256 |
7d4773ff0d30c4fa8b175db04a104a55dbe7d2050632262575efe02b8e2c8e2b
|