diff --git a/examples/ReactExample/ios/ReactExample.xcodeproj/project.pbxproj b/examples/ReactExample/ios/ReactExample.xcodeproj/project.pbxproj index 4a7a9dfa..164353d3 100644 --- a/examples/ReactExample/ios/ReactExample.xcodeproj/project.pbxproj +++ b/examples/ReactExample/ios/ReactExample.xcodeproj/project.pbxproj @@ -635,7 +635,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "rm -rf ../node_modules/realm\n[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nnpm install realm"; + shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nnpm install realm"; }; F6C465131C48706400E79896 /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; diff --git a/examples/ReactExample/run-android.sh b/examples/ReactExample/run-android.sh index 4f645e7e..d7f00b63 100755 --- a/examples/ReactExample/run-android.sh +++ b/examples/ReactExample/run-android.sh @@ -5,7 +5,6 @@ set -e PATH="/opt/android-sdk-linux/platform-tools:$PATH" -rm -rf node_modules/realm npm install realm adb reverse tcp:8081 tcp:8081 diff --git a/examples/ReactNativeBenchmarks/run-android.sh b/examples/ReactNativeBenchmarks/run-android.sh index 4f645e7e..d7f00b63 100755 --- a/examples/ReactNativeBenchmarks/run-android.sh +++ b/examples/ReactNativeBenchmarks/run-android.sh @@ -5,7 +5,6 @@ set -e PATH="/opt/android-sdk-linux/platform-tools:$PATH" -rm -rf node_modules/realm npm install realm adb reverse tcp:8081 tcp:8081 diff --git a/scripts/test.sh b/scripts/test.sh index 8db02259..38b9eac7 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -68,6 +68,12 @@ unlock_device() { cleanup trap cleanup EXIT +# Use a consistent version of Node if possible. +if [ -s "${HOME}/.nvm/nvm.sh" ]; then + . "${HOME}/.nvm/nvm.sh" + nvm use 5.4.0 || true +fi + case "$TARGET" in "jsdoc") npm run jsdoc @@ -82,7 +88,7 @@ case "$TARGET" in unzip -q ../../target=node_modules/react_tests_node_modules.zip fi - npm update react-native + npm install open_chrome start_packager popd @@ -96,7 +102,7 @@ case "$TARGET" in unzip -q ../../target=node_modules/react_example_node_modules.zip fi - npm update react-native + npm install open_chrome start_packager @@ -108,13 +114,6 @@ case "$TARGET" in exit 0 fi - [ -s "${HOME}/.nvm/nvm.sh" ] && . "${HOME}/.nvm/nvm.sh" - nvm use 5.4.0 || true - - pushd react-native/android - ./gradlew installarchives - popd - pushd tests/react-test-app npm install diff --git a/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj b/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj index bec981ec..a0b82dad 100644 --- a/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj +++ b/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj @@ -615,7 +615,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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/query-tests.json\n"; + shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\" \nnpm install realm realm-tests\ncp ../../../src/object-store/parser/queryTests.json ../node_modules/realm-tests/query-tests.json\n"; }; F6EDE5BF1C49007200B1085F /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; diff --git a/tests/react-test-app/run-android.sh b/tests/react-test-app/run-android.sh index 122e69a4..febe3497 100755 --- a/tests/react-test-app/run-android.sh +++ b/tests/react-test-app/run-android.sh @@ -5,7 +5,6 @@ set -e PATH="/opt/android-sdk-linux/platform-tools:$PATH" -rm -rf node_modules/realm node_modules/realm-tests npm install realm realm-tests cp ../../src/object-store/parser/queryTests.json node_modules/realm-tests/query-tests.json