Linux command
poetry-version 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show current version
poetry version
Bump major version
poetry version major
Bump minor version
poetry version minor
Bump patch version
poetry version patch
Set specific version
poetry version [1.2.3]
说明
poetry version displays or updates the project version in pyproject.toml. Without arguments, it shows the current version. With a bump rule (major, minor, patch, premajor, preminor, prepatch, prerelease) or an explicit version string, it updates the version accordingly. The --short flag outputs only the version number without the project name. Use --dry-run to preview the version change without modifying the file.
参数
- major
- Bump major version.
- minor
- Bump minor version.
- patch
- Bump patch version.
- --short
- Only output version.
- --dry-run
- Don't modify files.
FAQ
What is the poetry-version command used for?
poetry version displays or updates the project version in pyproject.toml. Without arguments, it shows the current version. With a bump rule (major, minor, patch, premajor, preminor, prepatch, prerelease) or an explicit version string, it updates the version accordingly. The --short flag outputs only the version number without the project name. Use --dry-run to preview the version change without modifying the file.
How do I run a basic poetry-version example?
Run `poetry version` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does major do in poetry-version?
Bump major version.