Skip to content

Extend poetry version xxx commands to support -beta.# and -rc.# #1959

@joeb1415

Description

@joeb1415
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

poetry version prepatch (or prerelease, etc.) is great for incrementing the version from 1.2.3 to 1.2.4-alpha.0, and then to 1.2.4-alpha.1, etc. but this is the extent of the functionality.
https://python-poetry.org/docs/cli/#version

It would be great if we could add a few other commands to allow for pre-release name patterns. Adding alpha, beta, and rc would make sense as the other available commands to support other pre-release versions. This could work as:

$ poetry version alpha
Bumping version from 1.2.3 to 1.2.4-alpha.0
$ poetry version alpha
Bumping version from 1.2.4-alpha.0 to 1.2.4-alpha.1
$ poetry version beta
Bumping version from 1.2.4-alpha.1 to 1.2.4-beta.0
$ poetry version rc
Bumping version from 1.2.4-beta.0 to 1.2.4-rc.0
$ poetry version rc
Bumping version from 1.2.4-rc.0 to 1.2.4-rc.1
$ poetry version patch
Bumping version from 1.2.4-rc.1 to 1.2.4

This would adhere to the pre-release precedence order described here:
https://semver.org/#spec-item-11

Thanks for considering!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions