lishwist/scripts/pre-commit

12 lines
195 B
Bash
Executable File

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