Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong commit message when cargo release --workspace is run with single crate #701

Open
psandana opened this issue Sep 6, 2023 · 0 comments

Comments

@psandana
Copy link

psandana commented Sep 6, 2023

Summary

If a virtual workspace only contains a single crate, and the following line is run:

cargo release patch --workspace --execute

It produces the following commit message:

chore: Release {{crate_name}} version 0.0.1

Expected

The expectation would be to use the single crate name, or, the list of crates and versions.

Root-cause

The following line introduces the issue:

is_workspace: 1 < ws_meta.workspace_members.len(),

It assumes if there is single crate, even if the user in purpose provided the --workspace argument, that will use the single crate mode, but it does not fetches the crate name correctly.

Expected fixes

  • Honour the --workspace argument and do not default to crate mode if len is 1, or,
  • Provide the name of the crate correctly in the commit message.

Extras:

Ideally, the --workspace argument should generate a commit listing all packages and their versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant