2018-07-19 12:01:23 +00:00
|
|
|
#!/bin/bash
|
2018-09-11 22:27:47 +00:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2018-09-07 20:08:05 +00:00
|
|
|
#
|
|
|
|
# This source code is licensed under the MIT license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
#
|
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
|