tree-sitter-plpgsql/scripts/pre-commit

15 lines
257 B
Text
Raw Normal View History

2023-01-05 18:08:21 +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
if [ ! -z $(git diff --cached --name-only | grep -e "^grammar.js$") ]
then
make build
2023-01-06 23:52:08 +03:00
make build-wasm
2023-01-05 18:08:21 +03:00
git add src bindings *.wasm
fi