crate-ci / cargo-release

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

changes subcommand misses some options: `--prev-tag-name`, maybe more #745

Closed pacak closed 9 months ago

pacak commented 9 months ago

Trying to automate release process, wasn't using cargo-release previously on this repo. --help suggests that first step is going to be changes so running it manually:

% cargo release changes -v
...
[2024-01-17T13:20:49Z DEBUG cargo_release::steps::changes] Cannot detect changes for cargo-show-asm because no tag was found. Try setting `--prev-tag-name <TAG>`.

No output without -v, with -v it suggests to set --prev-tag-name, which doesn't work:

% cargo release  changes --prev-tag-name=0.2.27
error: unexpected argument '--prev-tag-name' found

Usage: cargo release changes [OPTIONS]

For more information, try '--help'.
% cargo release   --prev-tag-name 0.2.27  change
serror: invalid value 'changes' for '[LEVEL|VERSION]': unexpected character 'c' while parsing major version number

For more information, try '--help'.
epage commented 9 months ago

Thanks for reporting this!

--help suggests that first step is going to be changes so running it manually:

To clarify, cargo release changes is a tool for you to help audit before release but all of the other "steps" are more for debugging or error recovery. cargo release <level> encompasses those steps so you only have one command you need to run when it comes time for a release. When first using cargo release, I recommend doing so with trace-level logging (more -vs) so you can verify its doing exactly what you want (prints all operations, diffs of files that would change, etc). Then you can run with --execute / -x knowing its doing the right thing.

pacak commented 9 months ago

To clarify, cargo release changes is a tool for you to help audit before release but all of the other "steps" are more for debugging or error recovery.

Yea, that's what more or less what I was trying to do. More -v and trying to confirm that it will do what I think it will do. Thanks for the quick fix!