lishwist/scripts/pre-commit

14 lines
188 B
Bash
Executable File

#!/bin/sh
cd core/
APISNAP=api.snap.txt
./scripts/api_snapshot > $APISNAP
git diff --quiet $APISNAP
if [[ $? -ne 0 ]]; then
echo "There are unstaged changes to $APISNAP"
exit 1
fi