crate-ci / cargo-release

Cargo subcommand `release`: everything about releasing a rust crate.
Apache License 2.0
1.33k stars 112 forks source link

`tag-message` in configuration is not respected #687

Closed azzamsa closed 1 year ago

azzamsa commented 1 year ago

Hi.

I have set tag-message in Cargo.toml

[package.metadata.release]
tag-message = "{{version}}"

But, I still get this commit format:

chore: Release nai version 0.2.1

image

Thanks!

epage commented 1 year ago

What you seem to be showing is the commit messages which are distinct from the tag messages.

It would help if you provided a link to the repo, reproduction steps, etc.

azzamsa commented 1 year ago

I suspect it comes from tag-message because it is the only variable that has the same template https://github.com/crate-ci/cargo-release/blob/c8bc39d2cb0c821913869cfe7572e2a7fdb00bc3/docs/reference.md?plain=1#L128.

This is my config: https://github.com/azzamsa/nai/blob/6208b65a411f143a0532beb252375c1db8e1e224/Cargo.toml#L53 This is my entry point: https://github.com/azzamsa/nai/blob/6208b65a411f143a0532beb252375c1db8e1e224/justfile#L60

I invoke everything with just release <level> .

epage commented 1 year ago

That commit message is coming from

https://github.com/crate-ci/cargo-release/blob/c8bc39d2cb0c821913869cfe7572e2a7fdb00bc3/docs/reference.md?plain=1#L126.

azzamsa commented 1 year ago

I was hoping it was the right config, but the default value always holds me back.

epage commented 1 year ago

If you run cargo release config, a fully defaulted config will be dumped to the screen. Granted, there are some nuances missing due to workspace vs non-workspace bug for a package like yours, it likely is fully accurate

azzamsa commented 1 year ago
consolidate-commits = false
pre-release-commit-message = "chore: Release {{crate_name}} version {{version}}"
pre-release-replacements = []

Should I open a PR to update the default value in the docs?

epage commented 1 year ago

That default is actually dependent on the situation (workspace with consolidated commits or not). Its hard to express that in a simple table though.

azzamsa commented 1 year ago

Oh, I see.

I should rely on config command.

Thanks a lot for cargo-release! :heart: