Add check if run from gitlab development kit root directory.
This commit is contained in:
parent
f6e5772dfc
commit
2abf63899d
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue