Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(version): allows bumping a prerelease version #105

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

koozz
Copy link
Contributor

@koozz koozz commented Jan 20, 2023

When prerelease is given as a parameter with the value 'beta', the version would look like: x.y.z-beta.1, if this tag is present, the next bump would be x.y.z-beta.2.

Fixes: #90

Copy link
Collaborator

@hdevalke hdevalke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.

I will have a look at it more in detail later.

src/cli.rs Outdated
@@ -58,6 +58,9 @@ pub struct VersionCommand {
/// Bump to a patch release version, regardless of the conventional commits
#[clap(long)]
pub patch: bool,
/// Suffix with a prerelease version. Only works in combination with bump
#[clap(long, default_value = "")]
pub prerelease: String,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it is good to use semver::Prerelease.
This will validate the command line argument

When prerelease is given as a parameter with the value 'beta', the
version would look like: x.y.z-beta.1

Fixes: convco#90

Signed-off-by: Jan van den Berg <koozz@linux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle pre-release channels
2 participants