Created
April 23, 2023 17:24
-
-
Save SamDudley/7ac7959de8141546fe14b13ae01e1585 to your computer and use it in GitHub Desktop.
Check requirements.txt is up to date with Poetry export.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # `poetry export --without-hashes` output requirements to stdout | |
| # `--without-hashes` is optional | |
| # `git diff --exit-code -- requirements.txt -` | |
| # `--exit-code` exit with 1 if there is a difference | |
| # `requirements.txt -` diff the requirements file with stdin (output from poetry export) | |
| poetry export --without-hashes | git diff --exit-code -- requirements.txt - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment