endtoend-build-tests 925 B

123456789101112131415161718192021222324252627282930
  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 using a simple build setup.
  12. tests="tus-drag-drop tus-dashboard i18n-drag-drop xhr-limit providers thumbnails transloadit"
  13. for t in $tests; do
  14. mkdir -p "${__root}/test/endtoend/$t/dist"
  15. cp "${__root}/packages/uppy/dist/uppy.min.css" "${__root}/test/endtoend/$t/dist"
  16. cp "${__root}/test/endtoend/$t/index.html" "${__root}/test/endtoend/$t/dist"
  17. browserify "${__root}/test/endtoend/$t/main.js" \
  18. -o "${__root}/test/endtoend/$t/dist/bundle.js" \
  19. -t babelify
  20. done
  21. # Speeecial tests that need custom builds.
  22. pushd "${__root}/test/endtoend/create-react-app"
  23. npm install
  24. npm run build
  25. popd