Advertisement
Guest User

Untitled

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