Run pre-commit hook when changing yarn.lock

This commit is contained in:
Benoit Daloze
2022-10-14 13:41:53 +02:00
parent 3068fa83f9
commit d240f61f8b
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
if [ "$(dirname "$0")" != ".git/hooks" ] || git diff --cached --name-only | grep -E '.(js|json)$'; then if [ "$(dirname "$0")" != ".git/hooks" ] || git diff --cached --name-only | grep -E '.(js|json)$|yarn.lock'; then
yarn install yarn install
yarn run package yarn run package
exec git add dist/index.js exec git add dist/index.js