pleshevski.ru/scripts/pre-commit

14 lines
217 B
Text
Raw Permalink Normal View History

2024-07-25 16:59:34 +03:00
#! /usr/bin/env bash
# Can be used as a pre-commit hook
# Just symlink this file to .git/hooks/pre-commit
set -xe
2024-08-07 11:48:54 +03:00
if [ ! -z "$(git diff --cached --name-only | grep "^docs/")" ]
2024-07-25 16:59:34 +03:00
then
make build
git add dist
fi