cargo-changelog icon indicating copy to clipboard operation
cargo-changelog copied to clipboard

cargo-changelog currently does not 'bump' versions

Open TheNeikos opened this issue 2 years ago • 2 comments
trafficstars

Currently, when running cargo changelog create-release minor it does not actually 'bump' versions or anything. It just reads out the current version through this call chain:

https://github.com/matthiasbeyer/cargo-changelog/blob/cc3f10b5d8c3883dd81d9658801c0159cbaa5762/src/command/create_release_command.rs#L14

Which then calls find_version_string:

https://github.com/matthiasbeyer/cargo-changelog/blob/cc3f10b5d8c3883dd81d9658801c0159cbaa5762/src/command/common.rs#L32-L62

This only reads out the version of the Cargo.toml in the project and ultimately returns the first it finds. No bumping or otherwise.

It is unclear to me how to solve this, as cargo-changelog is not a release manager. Hence running cargo changelog create-release major could not do much other than 'trust' the version it is given.

This impacts #239 as that requires the input to be 'truthful' to actually be able to work.

TheNeikos avatar Apr 30 '23 10:04 TheNeikos

:facepalm:

Yeah,... alpha software! :+1:

matthiasbeyer avatar Apr 30 '23 10:04 matthiasbeyer

after discussion, we've come to the following conclusion:

  • cargo-changelog will not read any Cargo.toml anymore
  • The user specifies what version they plan on releasing, the tool then checks the last released version and based on that bumps the version that has been given (major/minor/patch) and puts all the files in there
  • It defaults to 0.0.0 and goes on from there (so a minor bump on an empty project will release 0.1.0)
  • if custom versions are required, then they can still be given with the custom switch

TheNeikos avatar Apr 30 '23 14:04 TheNeikos