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

Pre-release hook in CLI options #741

Open
M-Adoo opened this issue Jan 8, 2024 · 2 comments
Open

Pre-release hook in CLI options #741

M-Adoo opened this issue Jan 8, 2024 · 2 comments

Comments

@M-Adoo
Copy link

M-Adoo commented Jan 8, 2024

Hi!, thanks for this great tool.

I'm writing a GitHub action to help publish my projects to crates.io. I want to configure the pre-release hook in the CLI options, so I don't need to configure release.toml for each project.

It's there a way to do this? If not, what do you think about adding this feature?

@epage
Copy link
Collaborator

epage commented Jan 8, 2024

You can workaround this by writing a release.toml to a tmp dir and pass that to --config to pick it up.

For a CLI design, I see this either working as --pre-commit-hook "<line>" and doing shlex on it or -pre-commit-hook <arg> [<arg>...] ;.

Since before my involvement, we expose most settings. In some other tools. I've adopted a different approach where the expectation is that things that shouldn't change from run-to-run should all be in a config. I'm somewhat tempted to take that approach here. I know your Action replaces the config but, with a workaround, I'm less feeling the need. This isn't a "no" but "I'm hesitant".

@M-Adoo
Copy link
Author

M-Adoo commented Jan 9, 2024

Thanks for the reply. Instead of replacing the configuration, I aim to execute an additional hook on the project before the release.. --pre-commit-hook seems to be a good place to do this, but it appears that --pre-commit-hook is currently not supported.

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

2 participants