Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # capture info messages and any errors in a log file
- exec >> log/hooks-out.log 2>&1
- if git diff-tree --name-only --no-commit-id ORIG_HEAD HEAD | grep -q 'package.json'; then
- echo "$(date): reinstalling deps since package.json changed"
- yarn > /dev/null
- else
- echo "$(date): no changes detected in package.json"
- fi
- # link is needed: ln -fv [script location] .git/hooks/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement