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 00:58:14 +03:00
|
|
|
# TODO: Enable when performance improves
|
|
|
|
# make build-wasm
|
2023-01-05 18:08:21 +03:00
|
|
|
git add src bindings *.wasm
|
|
|
|
fi
|
|
|
|
|