1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Allow bypassing the pre-commit script with NOVALIDATE=1

This commit is contained in:
jeremystretch
2021-11-05 13:40:38 -04:00
parent 3eda8d8482
commit e04402ed57

View File

@ -11,6 +11,7 @@ exec 1>&2
EXIT=0
RED='\033[0;31m'
YELLOW='\033[0;33m'
NOCOLOR='\033[0m'
if [ -d ./venv/ ]; then
@ -22,6 +23,11 @@ if [ -d ./venv/ ]; then
fi
fi
if [ ${NOVALIDATE} ]; then
echo "${YELLOW}Skipping validation checks${NOCOLOR}"
exit $EXIT
fi
echo "Validating PEP8 compliance..."
pycodestyle --ignore=W504,E501 --exclude=node_modules netbox/
if [ $? != 0 ]; then