Skip to content

Commit

Permalink
fix: git hook commit-msg
Browse files Browse the repository at this point in the history
  • Loading branch information
panpuchkov committed Dec 24, 2023
1 parent 6c94845 commit 1f9f16b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.idea
.tox
.coverage
*/__pychache__/*
*/__pycache__/*
venv
16 changes: 4 additions & 12 deletions scripts/git/hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
#!/bin/sh

# pygitver - commit-msg git hook
COMMIT_MSG=$1
COMMIT_LINT_DOCKER="panpuchkov/pygitver"
docker run --rm -v $(pwd):/app -w /app ${COMMIT_LINT_DOCKER} --check-commit-message "$(cat \"${COMMIT_MSG}\")"

COMMIT_LINT_CHECK="$?"
if [[ 0 -ne "${COMMIT_LINT_CHECK}" ]]; then
exit ${COMMIT_LINT_CHECK};
fi
set -e

# update docker image in background (optional, uncomment next line if you want auto update)
# docker pull ${COMMIT_LINT_DOCKER} >> /dev/null &

# pygitver - commit-msg git hook ^^^
COMMIT_MSG=$1
COMMIT_LINT_DOCKER="panpuchkov/pygitver"
docker run --rm -v $(pwd):/app -w /app ${COMMIT_LINT_DOCKER} --check-commit-message "$(cat ${COMMIT_MSG})"

0 comments on commit 1f9f16b

Please sign in to comment.