install from test script

This commit is contained in:
Ari Lazier 2015-12-15 18:18:18 -08:00
parent 2476c061c1
commit 4c402a7daf
3 changed files with 10 additions and 4 deletions

View File

@ -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 */

View File

@ -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

View File

@ -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 */