2016-11-24 13:29:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# This is a wrapper script which uses docker. It is used in CI, but can also
|
|
|
|
# be used locally if you have your ~/.android directory setup and access to
|
|
|
|
# /dev/bus/usb.
|
|
|
|
#
|
|
|
|
# ./scripts/docker-android-wrapper.sh ./scripts/test.sh react-tests-android
|
|
|
|
#
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
./scripts/docker_build_wrapper.sh ci/realm-js:build .
|
|
|
|
|
2016-11-24 16:39:50 +00:00
|
|
|
exec docker run --rm \
|
2016-11-24 13:29:19 +00:00
|
|
|
-u $(id -u) \
|
|
|
|
--privileged \
|
|
|
|
--net=host \
|
|
|
|
-e HOME=/tmp \
|
|
|
|
-e _JAVA_OPTIONS=-Duser.home=/tmp \
|
|
|
|
-v /etc/passwd:/etc/passwd:ro \
|
|
|
|
-v /dev/bus/usb:/dev/bus/usb \
|
|
|
|
-v $HOME/.android:/tmp/.android \
|
|
|
|
-v $(pwd):/source \
|
|
|
|
-w /source \
|
|
|
|
ci/realm-js:build \
|
|
|
|
"${@}"
|