Add a check for the existence of pre-commit.sh

so that you don't get stuck when working on branches that don't have this yet.
This commit is contained in:
Jeff Bradberry 2021-05-18 13:20:55 -04:00
parent fb7c827bff
commit c887f84a05

View File

@ -272,7 +272,9 @@ black: reports
@(set -o pipefail && $@ $(BLACK_ARGS) awx awxkit awx_collection | tee reports/$@.report)
.git/hooks/pre-commit:
@echo "./pre-commit.sh" > .git/hooks/pre-commit
@echo "if [ -x pre-commit.sh ]; then" > .git/hooks/pre-commit
@echo " ./pre-commit.sh;" >> .git/hooks/pre-commit
@echo "fi" >> .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
genschema: reports