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]
-
hatch.toml
[version]
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
hatch_vcs-0.0.1.tar.gz
(9.2 kB
view details)
Built Distribution
File details
Details for the file hatch_vcs-0.0.1.tar.gz
.
File metadata
- Download URL: hatch_vcs-0.0.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.21.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6301364a84b13236d7aea1ba642a022b7388409d867063084a79c745a28b8aef |
|
MD5 | 76fac886aad33c2edb8514748f05197a |
|
BLAKE2b-256 | 068ad089640fbd87c17197307422d70a2fbafd5690cfd50a986dae88b1d2aa27 |
File details
Details for the file hatch_vcs-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: hatch_vcs-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.21.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 885b3bd2997a2c9f23cad7a26ed31b83b419ddf8771a2f4d631627475c99892a |
|
MD5 | c278c33b1627a6a4b412e123a4aaef93 |
|
BLAKE2b-256 | 4d57a42aed3a2957fe3d43c83f32dbaf2a2730123f7c5a2aa779d98a9c7355d1 |