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

Feature Request: --locked flag for use in CI #57

Open
msrd0 opened this issue Nov 24, 2020 · 1 comment
Open

Feature Request: --locked flag for use in CI #57

msrd0 opened this issue Nov 24, 2020 · 1 comment

Comments

@msrd0
Copy link
Contributor

msrd0 commented Nov 24, 2020

Many cargo subcommands implement a --locked flag intended to be used in CI to verify that e.g. the content of the Cargo.lock file matches that of the Cargo.toml file. Since cargo readme updates the readme based on the contents of lib.rs, it would be nice if I could have my CI do something like

cargo readme -o README.md --locked

and have cargo readme verify that the output it would generate is identical to the present readme, without updating the file but rather fail with a non-zero exit code if the output differs.

@clbarnes
Copy link

For anyone who comes across this and is wondering how to get the functionality today; cargo readme -o README.md && git diff --exit-code

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