pleshevski.ru/scripts/pre-commit
2024-08-07 11:50:47 +03:00

14 lines
217 B
Bash
Executable file

#! /usr/bin/env bash
# Can be used as a pre-commit hook
# Just symlink this file to .git/hooks/pre-commit
set -xe
if [ ! -z "$(git diff --cached --name-only | grep "^docs/")" ]
then
make build
git add dist
fi