Add check if run from gitlab development kit root directory.

This commit is contained in:
Jacob Schatz 2018-01-02 16:01:45 -05:00
parent f6e5772dfc
commit 2abf63899d

View file

@ -1,4 +1,11 @@
#!/bin/sh
# Check if file exists with -f. Check if in in the gdk rook directory.
if [ ! -f ../GDK_ROOT ]; then
echo "Please run pre-commit from gitlab (e.g. gitlab-development-kit/gitlab) root directory."
exit 1
fi
jsfiles=$(git diff --cached --name-only --diff-filter=ACM "*.js" | tr '\n' ' ')
[ -z "$jsfiles" ] && exit 0