Merge pull request #572 from realm/al-npm-dedupe
Don't run npm install multiple times
This commit is contained in:
commit
c8e4dc39c0
|
@ -581,7 +581,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
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 */ = {
|
F6C465131C48706400E79896 /* Bundle React Native code and images */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
export TEST_SCRIPT=1
|
||||||
|
export NPM_CONFIG_PROGRESS=false
|
||||||
|
|
||||||
TARGET="$1"
|
TARGET="$1"
|
||||||
CONFIGURATION="${2:-"Release"}"
|
CONFIGURATION="${2:-"Release"}"
|
||||||
DESTINATION=
|
DESTINATION=
|
||||||
|
@ -58,7 +61,11 @@ xctest() {
|
||||||
${SRCROOT}/scripts/reset-simulators.sh
|
${SRCROOT}/scripts/reset-simulators.sh
|
||||||
|
|
||||||
local dest="$(xcrun simctl list devices | grep -v unavailable | grep -m 1 -o '[0-9A-F\-]\{36\}')"
|
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.
|
# Cleanup now and also cleanup when this script exits.
|
||||||
|
|
|
@ -578,7 +578,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
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 */ = {
|
F6EDE5BF1C49007200B1085F /* Bundle React Native code and images */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|
Loading…
Reference in New Issue