A Poetry plugin that observes the current git commit to build a date-based version number
Project description
poetry-commit-date-versioning
Date-based versioning for Poetry projects. Reads the commit date and sha from git and uses it to set the project version. Nothing else. No attempt is made to work with anything other than git.
To use:
poetry self add poetry-commit-date-versioning
- In pyproject.toml add a stanza to enable the plugin for a given project
[tool.poetry-commit-date-versioning]
enable = true
As the version number is not written into source code files anywhere, we
suggest using importlib
to determine your module's version number.
from importlib import metadata
__version__ = metadata.version(__name__)
This project was created as an alternative to
- poetry dynamic versioning because it rewrites the pyproject.toml file with every invocation (even if nothing has changed) and is thus incompatible with a development process that uses pyproject.toml file in Makefile dependencies.
- poetry date versioning plugin which may be abandoned and incomplete and which is definitely centered around writing version numbers into python source files.
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
Built Distribution
Close
Hashes for poetry_commit_date_versioning-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308a7ea7547f52db3131d417d13e8d487377232f0d13ee2763a3ea73732faa36 |
|
MD5 | 3c7082621dbd5084221c4f42db15c9ee |
|
BLAKE2b-256 | d2a56f4e5236cf43873ca46a116853d98e7917bcacafd9e135c0ae2dedb192c8 |
Close
Hashes for poetry_commit_date_versioning-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa22d0d2d3375b0b0f84d242b76c02e401069d0938d7229e9a576ad9d83693a1 |
|
MD5 | 0318e0f9a7508b12b32614c9c041731e |
|
BLAKE2b-256 | b19c80e9480e482e8542cd9b9ee348371413c17ff4b5aa3d4b2e80fe41e83dbc |