HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

poetry version — Manage Poetry project version. Assumes the following project stages: `patch`, `minor`, `major`, `pre

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandpoetryclimanageversionpoetry versionassumesproject

Problem

How to use the poetry version command: Manage Poetry project version. Assumes the following project stages: patch, minor, major, prepatch, preminor, premajor, prerelease. See also: asdf. More information: <https://python-poetry.org/docs/cli/#version>.

Solution

poetry version — Manage Poetry project version. Assumes the following project stages: patch, minor, major, prepatch, preminor, premajor, prerelease. See also: asdf. More information: <https://python-poetry.org/docs/cli/#version>.

Output the current version:
poetry version {{[-s|--short]}}


Set project to a specific phase:
poetry version {{stage}}


Increment the project to the next prerelease phase:
poetry version --next-phase


Test project stage function without writing to pyproject.toml:
poetry version {{stage}} --dry-run

Code Snippets

Output the current version

poetry version {{[-s|--short]}}

Set project to a specific phase

poetry version {{stage}}

Increment the project to the next prerelease phase

poetry version --next-phase

Test project stage function without writing to `pyproject.toml`

poetry version {{stage}} --dry-run

Context

tldr-pages: common/poetry version

Revisions (0)

No revisions yet.