bundleWeb.sh 553 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. # shellcheck disable=SC2059
  3. set -o errexit
  4. set -o nounset
  5. set -o pipefail
  6. # Change to the root directory of the repository
  7. cd "$(git rev-parse --show-toplevel)"
  8. cd web
  9. echo "Installing npm modules for the owncast web..."
  10. npm --silent install 2>/dev/null
  11. echo "Building owncast web..."
  12. rm -rf .next
  13. (node_modules/.bin/next build && node_modules/.bin/next export) | grep info
  14. echo "Copying web project to dist directory..."
  15. # Remove the old one
  16. rm -rf ../static/web
  17. # Copy over the new one
  18. mv ./out ../static/web
  19. echo "Done."