pdnsmanager/utils/pre-commit.hook
2018-04-09 13:30:04 +02:00

37 lines
411 B
Bash
Executable file

#!/bin/bash
cd frontend
if ! npm run lint
then
echo "Frontend lint failed"
exit 1
fi
cd ..
cd frontend
if ! npm run build
then
echo "Frontend build failed"
exit 2
fi
rm -rf dist/
cd ..
cd backend/src
if ! composer run-script lint
then
echo "Backend lint failed"
exit 3
fi
cd ../..
cd backend/test
if ! ./test.sh all
then
echo "Backend test failed"
exit 4
fi
cd ../..
exit 0