V-Beta-1.0.0
Vision is out of alpha !
This commit is contained in:
37
DEMO_GIT_HOOK_PRE-PUSH
Normal file
37
DEMO_GIT_HOOK_PRE-PUSH
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Check for phpcs
|
||||
which ./vendor/bin/phpcs
|
||||
if [[ "$?" == 1 ]]; then
|
||||
echo " Please install PHPCS "
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for phpstan
|
||||
which ./vendor/bin/phpstan
|
||||
if [[ "$?" == 1 ]]; then
|
||||
echo " Please install phpstan"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo " -- PHPCBF -- "
|
||||
./vendor/bin/phpcbf --colors --standard=PSR12 -p --ignore=./src/Kernel.php ./src
|
||||
|
||||
git add .
|
||||
git commit -m "PHPCBF AUTO"
|
||||
|
||||
echo " -- PHPCS -- "
|
||||
./vendor/bin/phpcs --colors --standard=PSR12 -p --ignore=./src/Kernel.php ./src
|
||||
if [[ "$?" == 1 ]]; then
|
||||
echo " PHPCS NOT OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo " -- PHPSTAN -- "
|
||||
./vendor/bin/phpstan analyse ./src
|
||||
if [[ "$?" == 1 ]]; then
|
||||
echo " PHPSTAN NOT OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user