cargo-edit
cargo-edit copied to clipboard
Setting version metadata doesn't preserve the pre-release version
An example:
❯ cargo set-version -p package -m 11.ge8fe5ff --dry-run
Upgrading package from 0.1.17-beta.3 to 0.1.17+11.ge8fe5ff
warning: aborting set-version due to dry run
❯ cargo set-version --version
cargo-edit-set-version 0.12.3
I'd imagine the version should change to 0.1.17-beta.3+11.ge8fe5ff. Is this intentional or a bug?
--metadata means "set the metadata on the bumped version"
The default if --bump <LEVEL> and [TARGET] are unset is to do strip pre-release versions.
This wasn't designed with "override the current metadata" in mind. We'd have to consider the importance of that use case, how it fits into the overall workflow, and when to do such a breaking change.