release-plz icon indicating copy to clipboard operation
release-plz copied to clipboard

Allow updating custom version fields

Open epage opened this issue 2 years ago • 3 comments

Motivations

Before cargo add, it was common to have a manifest snippet with a version in it. There are still other cases of versions and other relevant information appearing in repos, like citation files.

  • Would you like to implement this feature? maybe

Solution

cargo-release has a "pre-release replacements" set of regexes (example)

Alternatives

Hooks for running external programs. This exists in cargo-release but I never use it because its hard to do these cross-platform

Additional context

epage avatar Oct 06 '23 20:10 epage

This sounds good to me. We can call this field replacements in the config file and we can apply these replacements in the release-plz update command (and also release-pr). No need to support the command line argument. These options look good, except from the prerelease one which doesn't apply for release-plz. PR welcome!

marcoieni avatar Oct 07 '23 14:10 marcoieni

I'm also looking for this feature, also for the CITATION.cff but also possibly other files.

Next to that I'm also interested in the hooks, e.g. for bumping documentation.

Big thumbs up from me! :+1:

ruben-arts avatar Mar 05 '24 13:03 ruben-arts

Another way to implement replacements would be via the json output. Example: https://release-plz.ieni.dev/docs/usage/release-pr#json-output

We could add to the release-pr and update commands the new versions of each package.

Then people could run the replacements by theirselves by running sed for example.

Note that I'm still keen to add the functionality proposed in this issue because it plays well with the release-plz set-version command I would like to add (covered in another issue)

marcoieni avatar Jun 21 '24 10:06 marcoieni