Fix use of git diff

git diff always returns 0 without options
This commit is contained in:
Andreas Oberritter 2022-09-23 16:10:57 +00:00
parent a993d1fdc5
commit fbf6b18893
1 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,9 @@ set -e
if grep -qz '^--follow-tags$' /proc/$PPID/cmdline; then
poetry run clickusagemd run pyproject.toml
git diff USAGE.md >/dev/null || git commit -m "Updated USAGE.md" USAGE.md
if ! git diff --quiet USAGE.md; then
git commit -m "Updated USAGE.md" USAGE.md
fi
fi
exit 0