Hatch plugin for ci system versioning
Project description
hatch-ci
This provides a plugin to Hatch leveraging a CI/CD system (github at the moment) to deliver packages to PyPi.
NOTE: this is heavily inspired from hatch-vcs
Table of Contents
Global dependency
Ensure hatch-ci
is defined within the build-system.requires
field in your pyproject.toml
file.
[build-system]
requires = ["hatchling", "hatch-ci"]
build-backend = "hatchling.build"
Version source
The version source plugin name is ci
.
-
pyproject.toml
[tool.hatch.version] source = "ci"
Version source options
-
pyproject.toml
[tool.hatch.version] source = "ci" # this will be updated with __version__ and __hash__ info version-file = "src/hatch_ci/__init__.py" # the files here will be jinja2 processed dynamicaly at build time paths = [ "README.md" ] # the paths will have the strings 'a' & 'b' replaced before # jinja2 processing fixers = [ { 'a': '{ctx.workflows}' }, { 'd': '{ctx.branch}' } ]
Option | Type | Default | Description |
---|---|---|---|
version-file |
str |
None | A file where to write version/hash variables |
paths |
`list[str] | str` | None |
fixers |
list[dict[str,str]] |
None | A list of dict, each key is a string to replace with the value |
License
hatch-ci
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hatch_ci-0.1.0b35.tar.gz
(106.0 kB
view hashes)
Built Distribution
Close
Hashes for hatch_ci-0.1.0b35-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a18f32bee90b9525d87f4e11ba01ed8b4f6f6f9b56cc79175a0d2a9743472dce |
|
MD5 | 7505e47f2fec627d527e2b779d8e13b2 |
|
BLAKE2b-256 | e6db8c80ee7f5ff1e756e3259511797cb6e12d455687e080f0c0d6a3149c605b |