endtoend-build-tests 821 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env bash
  2. set -o pipefail
  3. set -o errexit
  4. set -o nounset
  5. set -o xtrace
  6. # Set magic variables for current file & dir
  7. __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  8. __file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
  9. __base="$(basename ${__file} .sh)"
  10. __root="$(cd "$(dirname "${__dir}")" && pwd)"
  11. tests="tus-drag-drop tus-dashboard i18n-drag-drop xhr-limit"
  12. for t in $tests; do
  13. mkdir -p "${__root}/test/endtoend/$t/dist"
  14. cp "${__root}/packages/uppy/dist/uppy.min.css" "${__root}/test/endtoend/$t/dist"
  15. cp "${__root}/test/endtoend/$t/index.html" "${__root}/test/endtoend/$t/dist"
  16. browserify "${__root}/test/endtoend/$t/main.js" \
  17. -o "${__root}/test/endtoend/$t/dist/bundle.js" \
  18. -t babelify
  19. done
  20. (cd "${__root}/test/endtoend/create-react-app" && npm install && npm run build > /dev/null)