hooks?
This commit is contained in:
parent
2841675691
commit
fac4a8aaf9
2 changed files with 12 additions and 1 deletions
|
|
@ -84,7 +84,11 @@
|
|||
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
|
||||
"Illuminate\\Foundation\\ComposerScripts::postUpdate"
|
||||
],
|
||||
"post-install-cmd": [],
|
||||
"post-install-cmd": [
|
||||
"cp -r 'hooks/' '.git/hooks/'",
|
||||
"php -r \"copy('hooks/pre-commit', '.git/hooks/pre-commit');\"",
|
||||
"php -r \"chmod('.git/hooks/pre-commit', 0777);\""
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
|
|
|
|||
7
hooks/pre-commit
Normal file
7
hooks/pre-commit
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Detect whether /dev/tty is available & functional
|
||||
if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then
|
||||
exec < /dev/tty
|
||||
fi
|
||||
|
||||
$(pwd)/vendor/bin/pint
|
||||
Loading…
Reference in a new issue