mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-08 12:12:37 +01:00
fixed git hooks
This commit is contained in:
parent
6576e4a74c
commit
9ad9c9feb2
@ -35,7 +35,7 @@
|
|||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "lint-staged",
|
"pre-commit": "lint-staged",
|
||||||
"pre-push": "npm test",
|
"pre-push": "npm test",
|
||||||
"post-merge": "scripts/sync-npm-dependencies.sh",
|
"post-merge": "npm install",
|
||||||
"post-checkout": "scripts/sync-npm-dependencies.sh"
|
"post-checkout": "scripts/sync-npm-dependencies.sh"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "checking package-lock.json for changes"
|
echo "checking package-lock.json for changes"
|
||||||
if [ "$1" != "$2" ]; then
|
IFS=' '
|
||||||
DIFF=$(git diff $1 $2 package-lock.json)
|
read -ra G_PARAMS <<< "$HUSKY_GIT_PARAMS"
|
||||||
|
PREV=${G_PARAMS[0]}
|
||||||
|
NEXT=${G_PARAMS[1]}
|
||||||
|
if [ "$PREV" != "$NEXT" ]; then
|
||||||
|
DIFF=$(git diff $PREV $NEXT package-lock.json)
|
||||||
if [ "$DIFF" != "" ]; then
|
if [ "$DIFF" != "" ]; then
|
||||||
npm install
|
npm install
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user