A React interface for Ampache player.

pre-commit 424B

123456789101112131415161718192021
  1. # Get against which ref to diff
  2. if git rev-parse --verify HEAD >/dev/null 2>&1
  3. then
  4. against=HEAD
  5. else
  6. # Initial commit
  7. # TODO
  8. exit 1
  9. fi
  10. js_files=$(git diff-index --name-only $against | grep -e ".jsx\?$" | grep -v "^app/dist")
  11. # Nothing more to do if no JS files was committed
  12. if [ -z "$js_files" ]
  13. then
  14. exit 0
  15. fi
  16. echo "Rebuilding dist JavaScript files…"
  17. NODE_ENV=production npm run build
  18. git add app/dist