githook: Call poetry, commit only on demand
This commit is contained in:
parent
b6f0b80baf
commit
ce00aaf85b
|
@ -5,9 +5,9 @@ PRE_PUSH_SCRIPT = """#!/bin/sh
|
|||
|
||||
set -e
|
||||
|
||||
if [ -n "$VIRTUAL_ENV" ] && grep -qz '^--follow-tags$' /proc/$PPID/cmdline; then
|
||||
clickusagemd run ${GIT_DIR}pyproject.toml
|
||||
git commit -m "Updated USAGE.md" ${GIT_DIR}USAGE.md
|
||||
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
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue