Skip to main content

Poetry plugin to update project version strings on poetry version command

Project description

The poetry version command only updates version in pyproject.toml file. This plugin updates version in other files when poetry version <version> command is executed.

Getting Started

Prerequisites

  • poetry = ^1.2.0a1

Install

Install the plugin by poetry plugin command.

poetry plugin add poetry-bumpversion

Configure files

Say you have __version__ variable set at your_package/__init__.py file

__version__ = "0.1.0" # It MUST match the version in pyproject.toml file

Add the following to your pyproject.toml file.

[tool.poetry_bumpversion.file."your_package/__init__.py"]

Now run poetry version patch to check if version in both pyproject.toml and your_package/__init__.py file has been updated.

You can add more files following the steps above. You can also fine define search and replace terms to be more precise

[tool.poetry_bumpversion.file."your_package/__init__.py"]
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

License

This project is licensed under MIT License - see the LICENSE file for details.

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

poetry-bumpversion-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

poetry_bumpversion-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file poetry-bumpversion-0.1.0.tar.gz.

File metadata

  • Download URL: poetry-bumpversion-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0a1 CPython/3.8.10 Linux/5.13.0-1022-azure

File hashes

Hashes for poetry-bumpversion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c71bd735197ce107cfb72ca527b21dab2181d31632812b8cb16fe8f918cbc796
MD5 8986e023425277f48bc18b2751b1b405
BLAKE2b-256 df37e933b1655e4f880bd402559754df4f9cc41da0e1e47295f64b9405673ab4

See more details on using hashes here.

File details

Details for the file poetry_bumpversion-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: poetry_bumpversion-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0a1 CPython/3.8.10 Linux/5.13.0-1022-azure

File hashes

Hashes for poetry_bumpversion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 976f66e8fc78d5954186ba47c0e071da5ca16fb9c586ed4e024fb5764f6ae210
MD5 078fd80b858c155a3414a3d1f2a11edf
BLAKE2b-256 10ac53c21adafad353b15a7f820540fe5505e61cbba0d2df620cef96782e753b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page