Files
cheatsheet-tldr/tldr/poetry-version
2025-09-12 00:18:39 +00:00

28 lines
670 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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`