mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 06:46:03 +00:00
pr feedback
This commit is contained in:
parent
4c402a7daf
commit
de227cff28
@ -1,21 +0,0 @@
|
||||
set -o pipefail
|
||||
|
||||
DIRECTORY=${1:-"."}
|
||||
|
||||
if [ ! -f "${DIRECTORY}/package.json" ]; then
|
||||
echo "No package.json in ${DIRECTORY}"
|
||||
exit 1
|
||||
fi
|
||||
VERSION=`cat ${DIRECTORY}/package.json | awk '/"react-native": "(.+)",/ { print substr($2, 2, length($2)-3) }'`
|
||||
|
||||
if [ -f "${DIRECTORY}/node_modules/react-native/package.json" ]; then
|
||||
CURRENT_VERSION=`cat ${DIRECTORY}/node_modules/react-native/package.json | awk '/"version": "(.+)",/ { print substr($2, 2, length($2)-3) }'`
|
||||
fi
|
||||
|
||||
pushd $DIRECTORY
|
||||
if [ "$VERSION" != "$CURRENT_VERSION" ]; then
|
||||
echo "Upgrading react-native to version $VERSION"
|
||||
npm install react-native
|
||||
fi
|
||||
popd
|
||||
|
@ -9,6 +9,8 @@ while pgrep -q Simulator; do
|
||||
pkill -9 Simulator 2>/dev/null || true
|
||||
done
|
||||
|
||||
pkill node || true
|
||||
|
||||
DESTINATION="-destination id=$(xcrun simctl list devices | grep -v unavailable | grep -m 1 -o '[0-9A-F\-]\{36\}')"
|
||||
TARGET=$1
|
||||
CONFIGURATION=${2:-"Debug"}
|
||||
@ -20,7 +22,7 @@ elif [ "$TARGET" = "react-tests" ]; then
|
||||
if [ -f ../../target=node_modules/react_tests_node_modules.zip ]; then
|
||||
unzip ../../target=node_modules/react_tests_node_modules.zip
|
||||
fi
|
||||
sh ../../scripts/npm_install_react_native.sh
|
||||
npm update react-native
|
||||
react-native start &
|
||||
popd
|
||||
|
||||
@ -30,10 +32,12 @@ elif [ "$TARGET" = "react-example" ]; then
|
||||
if [ -f ../../target=node_modules/react_example_node_modules.zip ]; then
|
||||
unzip ../../target=node_modules/react_example_node_modules.zip
|
||||
fi
|
||||
sh ../../scripts/npm_install_react_native.sh
|
||||
npm update react-native
|
||||
react-native start &
|
||||
xcodebuild -scheme ReactExample -configuration "$CONFIGURATION" -sdk iphonesimulator build $DESTINATION
|
||||
popd
|
||||
else
|
||||
echo "Invalid target '${TARGET}'"
|
||||
fi
|
||||
|
||||
pkill node || true
|
||||
|
Loading…
x
Reference in New Issue
Block a user