mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 20:44:10 +00:00
6e7b00508e
Summary:Hopefully this will fix https://travis-ci.org/facebook/react-native/jobs/123444671. Closes https://github.com/facebook/react-native/pull/7008 Differential Revision: D3188875 fb-gh-sync-id: 18d5870437b72fa28502fefd5431b0bb9184b956 fbshipit-source-id: 18d5870437b72fa28502fefd5431b0bb9184b956
33 lines
713 B
Bash
Executable File
33 lines
713 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
ROOT=$(dirname $SCRIPTS)
|
|
|
|
export REACT_PACKAGER_LOG="$ROOT/server.log"
|
|
|
|
cd $ROOT
|
|
|
|
function cleanup {
|
|
EXIT_CODE=$?
|
|
set +e
|
|
|
|
if [ $EXIT_CODE -ne 0 ];
|
|
then
|
|
WATCHMAN_LOGS=/usr/local/Cellar/watchman/3.1/var/run/watchman/$USER.log
|
|
[ -f $WATCHMAN_LOGS ] && cat $WATCHMAN_LOGS
|
|
|
|
[ -f $REACT_PACKAGER_LOG ] && cat $REACT_PACKAGER_LOG
|
|
fi
|
|
[ $SERVER_PID ] && kill -9 $SERVER_PID
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
./packager/packager.sh --nonPersistent &
|
|
SERVER_PID=$!
|
|
xctool \
|
|
-project Examples/UIExplorer/UIExplorer.xcodeproj \
|
|
-scheme UIExplorer -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5,OS=9.3' \
|
|
test
|