1
0
Fork 0
docsearch/docs/scripts/prepush
Tim Carry b422effcfa
Skip linting the docs when making a change to the root (#484)
It seems that Netlify is having some caching of the git remote and while this PR was working fine when I submitted it, it now fails as it has forgotten which remote to use.

I'm going to go and accept it, in order to group all the code that deals with Netlify in the same branch, allowing me to better have them work together.
2018-10-08 13:06:06 +02:00

13 lines
293 B
Bash
Executable file

#!/usr/bin/env sh
git diff --name-status master | grep 'docs/' 1>/dev/null
DOCS_FOLDER_HAS_CHANGED=$?
# We don't run the docs linting if no changes were made in the docs
if [ "$DOCS_FOLDER_HAS_CHANGED" = "1" ]; then
exit 0
fi
yarn run lint:js && \
yarn run lint:css && \
yarn run lint:md