From 4c402a7daf1ce1c95bdd135f11aee04e163402ce Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Tue, 15 Dec 2015 18:18:18 -0800 Subject: [PATCH] install from test script --- .../ReactExample.xcodeproj/project.pbxproj | 2 +- scripts/test.sh | 10 ++++++++-- .../ios/ReactTests.xcodeproj/project.pbxproj | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/ReactExample/ReactExample.xcodeproj/project.pbxproj b/examples/ReactExample/ReactExample.xcodeproj/project.pbxproj index f9a01878..0b246a30 100644 --- a/examples/ReactExample/ReactExample.xcodeproj/project.pbxproj +++ b/examples/ReactExample/ReactExample.xcodeproj/project.pbxproj @@ -624,7 +624,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "rm -rf ./node_modules/realm\n[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nsh ../../scripts/npm_install_react_native.sh\nnpm install realm"; + shellScript = "rm -rf ./node_modules/realm\n[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nnpm install realm"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/scripts/test.sh b/scripts/test.sh index 57376671..4f601c36 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -17,14 +17,20 @@ if [ "$TARGET" = "realmjs" ]; then xcodebuild -scheme RealmJS -configuration "$CONFIGURATION" -sdk iphonesimulator $DESTINATION build test elif [ "$TARGET" = "react-tests" ]; then pushd tests/react-test-app - #unzip ../../target=node_modules/react_tests_node_modules.zip + 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 react-native start & popd xcodebuild -scheme RealmReact -configuration "$CONFIGURATION" -sdk iphonesimulator $DESTINATION build test elif [ "$TARGET" = "react-example" ]; then pushd examples/ReactExample - #unzip ../../target=node_modules/react_example_node_modules.zip + 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 react-native start & xcodebuild -scheme ReactExample -configuration "$CONFIGURATION" -sdk iphonesimulator build $DESTINATION popd diff --git a/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj b/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj index 688f32cf..c5bb55ec 100644 --- a/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj +++ b/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj @@ -617,7 +617,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nsh ../../../scripts/npm_install_react_native.sh ..\n \nrm -rf ../node_modules/realm ../node_modules/realm-tests\nnpm install realm realm-tests\ncp ../../../src/object-store/parser/queryTests.json ../node_modules/realm-tests\n"; + shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\" \nrm -rf ../node_modules/realm ../node_modules/realm-tests\nnpm install realm realm-tests\ncp ../../../src/object-store/parser/queryTests.json ../node_modules/realm-tests\n"; }; /* End PBXShellScriptBuildPhase section */