Merge pull request #572 from realm/al-npm-dedupe

Don't run npm install multiple times
This commit is contained in:
Ari Lazier 2016-09-14 12:49:04 -04:00 committed by GitHub
commit c8e4dc39c0
3 changed files with 10 additions and 3 deletions

View File

@ -581,7 +581,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nnpm install realm";
shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nif [ -z \"$TEST_SCRIPT\" ]; then\n npm install realm\nfi";
};
F6C465131C48706400E79896 /* Bundle React Native code and images */ = {
isa = PBXShellScriptBuildPhase;

View File

@ -3,6 +3,9 @@
set -o pipefail
set -e
export TEST_SCRIPT=1
export NPM_CONFIG_PROGRESS=false
TARGET="$1"
CONFIGURATION="${2:-"Release"}"
DESTINATION=
@ -58,7 +61,11 @@ xctest() {
${SRCROOT}/scripts/reset-simulators.sh
local dest="$(xcrun simctl list devices | grep -v unavailable | grep -m 1 -o '[0-9A-F\-]\{36\}')"
xcodebuild -scheme "$1" -configuration "$CONFIGURATION" -sdk iphonesimulator -destination id="$dest" build test
if [ -n "$XCPRETTY" ]; then
xcodebuild -scheme "$1" -configuration "$CONFIGURATION" -sdk iphonesimulator -destination id="$dest" test | xcpretty -c --no-utf --report junit --output build/reports/junit.xml
else
xcodebuild -scheme "$1" -configuration "$CONFIGURATION" -sdk iphonesimulator -destination id="$dest" test
fi
}
# Cleanup now and also cleanup when this script exits.

View File

@ -578,7 +578,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\" \nnpm install realm realm-tests\ncp ../../../src/object-store/tests/query.json ../node_modules/realm-tests/query-tests.json\n";
shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\" \nif [ -z \"$TEST_SCRIPT\" ]; then\n npm install realm realm-tests\nfi\ncp ../../../src/object-store/tests/query.json ../node_modules/realm-tests/query-tests.json\n";
};
F6EDE5BF1C49007200B1085F /* Bundle React Native code and images */ = {
isa = PBXShellScriptBuildPhase;