2018-07-19 12:01:23 +00:00
|
|
|
#!/bin/bash
|
2018-05-16 00:25:16 +00:00
|
|
|
# This script should be run from the react-native root
|
2015-03-25 02:34:12 +00:00
|
|
|
|
2018-07-19 12:01:23 +00:00
|
|
|
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
|
2018-05-16 00:25:16 +00:00
|
|
|
source "scripts/.tests.env"
|
2015-03-25 02:34:12 +00:00
|
|
|
|
2018-05-16 00:25:16 +00:00
|
|
|
if [ -n "$1" ]
|
2015-03-26 15:55:30 +00:00
|
|
|
then
|
2018-05-16 00:25:16 +00:00
|
|
|
echo "Overriding..."
|
|
|
|
IOS_TARGET_OS="${1}"
|
|
|
|
SDK="iphonesimulator${1}"
|
|
|
|
DESTINATION="platform=iOS Simulator,OS=${IOS_TARGET_OS},name=${IOS_DEVICE}"
|
2015-03-26 15:55:30 +00:00
|
|
|
fi
|
|
|
|
|
2018-05-16 00:25:16 +00:00
|
|
|
xcodebuild \
|
|
|
|
-project "RNTester/RNTester.xcodeproj" \
|
|
|
|
-scheme $SCHEME \
|
|
|
|
-sdk $SDK \
|
|
|
|
-destination "$DESTINATION" \
|
2015-03-25 02:34:12 +00:00
|
|
|
build test
|