2022-12-10 05:23:27 +03:00
|
|
|
#! /usr/bin/env bash
|
|
|
|
|
2022-12-10 23:00:30 +03:00
|
|
|
# Can be used as a pre-commit hook
|
|
|
|
# Just symlink this file to .git/hooks/pre-commit
|
2022-12-10 05:23:27 +03:00
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
|
|
|
if [ ! -z $(git diff --cached --name-only | grep -e "^grammar.js$") ]
|
|
|
|
then
|
|
|
|
make build
|
|
|
|
make build-wasm
|
2022-12-10 23:09:11 +03:00
|
|
|
git add src bindings *.wasm
|
2022-12-10 05:23:27 +03:00
|
|
|
fi
|
|
|
|
|