killercup / cargo-edit

A utility for managing cargo dependencies from the command line.
http://killercup.github.io/cargo-edit/
MIT License
3.09k stars 148 forks source link

Question: how to go from `0.4.3` to `0.5.0-rc.1` using `set-version --bump <>` #901

Closed dilawar closed 3 months ago

dilawar commented 3 months ago

Thanks for this tool. Love it and use it throughout our org to do releases.

I have a minor inconvenience. Perhaps the solution is already present but I don't know. Let's say I am at version 0.4.3 and I want to do a rc release. If I do cargo set-version --bump rc, I get 0.4.4-rc.1 which is expected.

I am planning for ~0.4.4~ 0.5.0 but want to do a pre-release first, i.e., release ~0.4.4-rc.1~ 0.5.0-rc.1. How can I go from 0.4.3 to 0.5.0-rc.1 using a single or multiple --bump command?

Currently, I do cargo set-version 0.5.0-rc.1,, and I am OK with it. If it is possible to do it using --bumps, I'd love that. Perhaps--bump minor --with-rc 1`? Happy to contribute a PR.

epage commented 3 months ago

I suspect something is missing in your post because it looks as if you already have the answer

Let's say I am at version 0.4.3 and I want to do a rc release. If I do cargo set-version --bump rc, I get 0.4.4-rc.1 which is expected.

How can I go from 0.4.3 to 0.4.4-rc.1 using a single or multiple --bump command?

dilawar commented 3 months ago

@epage Really sorry for the causing confusion. I should've read the post carefully. I've updated the post.

I want to go from 0.4.x to 0.5.0-rc.1 just by using a chain of --bumps but it looks like its not possible.

epage commented 3 months ago

Correct, we do not have a way to do non-patch pre-releases with --bump.

This is being tracked in #700, closing in favor of that.