a guest Mar 20th, 2019 48 Never
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
- echo "$(date): no changes detected in package.json"
- # link is needed: ln -fv [script location] .git/hooks/
RAW Paste Data