2019-09-05 17:14:14 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo "checking package-lock.json for changes"
|
2019-09-05 22:16:32 +02:00
|
|
|
IFS=' '
|
|
|
|
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)
|
2019-09-05 17:14:14 +02:00
|
|
|
if [ "$DIFF" != "" ]; then
|
|
|
|
npm install
|
|
|
|
fi
|
|
|
|
fi
|