diff --git a/scripts/test.sh b/scripts/test.sh index 7e00bee0..6f3b5028 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -33,10 +33,6 @@ cleanup() { rm -f "$PACKAGER_OUT" "$LOGCAT_OUT" } -have() { - type "$@" >/dev/null 2>&1 -} - open_chrome() { local dir for dir in "$HOME/Applications" "/Applications"; do @@ -100,8 +96,14 @@ case "$TARGET" in xcodebuild -scheme ReactExample -configuration "$CONFIGURATION" -sdk iphonesimulator build $DESTINATION ;; "react-tests-android") + if [[ $CONFIGURATION == 'Debug' ]]; then + exit 0; + fi + [ -s "${HOME}/.nvm/nvm.sh" ] && . "${HOME}/.nvm/nvm.sh" - have nvm && nvm use 5.4.0 + if [[ $TARGET != *-android ]]; then + type npm >/dev/null 2>&1 && nvm use 5.4.0 + fi pushd react-native/android ./gradlew installarchives