A React interface for Ampache player.

pre-commit 445B

12345678910111213141516171819202122
  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. exit 1
  8. fi
  9. css_js_files=$(git diff-index --name-only $against | grep -e '.\(jsx\?\)\|\(s\?css\)$' | grep -v "^app/dist")
  10. # Nothing more to do if no JS files was committed
  11. if [ -z "$css_js_files" ]
  12. then
  13. exit 0
  14. fi
  15. echo "Rebuilding dist JavaScript files…"
  16. npm run clean
  17. npm run build:prod
  18. npm test
  19. git add app/dist