Skip to main content

A Poetry plugin to override a version in a pyproject.toml from environment variable or build and publish command option

Project description

Poetry Arbitrary Version Plugin

CI

A Poetry plugin that allows a project builder to override the project version. A project version can be overriden for example during CI process. The version can be overriden using the environment variable PROJECT_OVERRIDE_VERSION or the --override-version switch of the build command.

Install

Add the plugin to Poetry environment

$ poetry self add poetry-arbitrary-version-plugin

or install the plugin using pip to the place where Poetry is installed.

$ pip install poetry-arbitrary-version-plugin

Usage

Overriding a project version by PROJECT_OVERRIDE_VERSION environment variable:

$ PROJECT_OVERRIDE_VERSION=3.2.1 poetry build -f sdist
Overriden project version from 0.8.0 to 3.2.1
Building poetry-arbitrary-version-plugin (3.2.1)
  - Building sdist
  - Built poetry_arbitrary_version_plugin-3.2.1.tar.gz

Overriding a project version by the --override-version switch:

$ poetry build -f sdist --override-version=1.2.3
Overriden project version from 0.8.0 to 1.2.3
Building poetry-arbitrary-version-plugin (1.2.3)
  - Building sdist
  - Built poetry_arbitrary_version_plugin-1.2.3.tar.gz

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_version_override_plugin-0.1.4.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

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