Python
Notes
Use poetry-bumpversion
with poetry. Its a poetry plugin, and not tied to the project (wich would have been nice).
poetry self add poetry-bumpversion
And in your pyproject.toml
, configure as needed:
[tool.poetry_bumpversion.file."${module_name}/__init__.py"]
[tool.poetry_bumpversion.file."tests/test_version.py"]
With this example it will update __version__
in ${module_name}/__init__.py
to the version in pyproject.toml
, and also keep the version number in tests/test_version.py
up to date.