Newer
Older
Releasing a New Version
=======================
Versions of this project follow `Semantic Versioning 2.0.0 <http://semver.org/>`_.
We use `bump-my-version <https://github.com/callowayproject/bump-my-version>`_ to help update versions, and `towncrier <https://github.com/twisted/towncrier>`_ to generate the changelog.
Requirements
------------
pipx is the recommended way to install the required tools:
.. code-block:: sh
pipx install bump-my-version
pipx install towncrier
Using system packages is another option.
New Version
-----------
The parts of the version are: ``{major}.{minor}.{patch}``.
For example, to update the ``patch`` part and generate the changelog (requires python 3.11+ with toml):
.. code-block:: sh
bump-my-version bump patch
current_version=$(python3 -c "import tomllib;t = tomllib.load(open('.bumpversion.toml', 'rb'));print(t['tool']['bumpversion']['current_version'])")
towncrier build --version=$current_version --yes
hg remove newsfragments
hg amend
hg tag $current_version