MarcoIeni / release-plz

Publish Rust crates from CI with a Release PR.
https://release-plz.ieni.dev
Apache License 2.0
785 stars 74 forks source link

Allow updating custom version fields #1024

Open epage opened 11 months ago

epage commented 11 months ago

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.

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

MarcoIeni commented 11 months ago

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!

ruben-arts commented 6 months ago

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:

MarcoIeni commented 3 months ago

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)