nineskeletor/.githooks/commit-msg

18 lines
373 B
Plaintext
Raw Normal View History

2022-09-21 12:16:27 +02:00
#!/bin/bash
set -eo pipefail
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
export PATH="${PATH}:${DIR}/../node_modules/.bin"
function lint_commit_message {
local commit_message_file="$1"
cat "$commit_message_file" | commitlint
}
function main {
local commit_message_file="$1"
lint_commit_message "$commit_message_file"
}
main $@