|
@@ -1,5 +1,8 @@
|
|
1
|
+const _ = require('lodash');
|
1
|
2
|
const exec = require('shell-utils').exec;
|
2
|
3
|
|
|
4
|
+const release = _.includes(process.argv, 'release');
|
|
5
|
+
|
3
|
6
|
function runWithXcpretty(cmd) {
|
4
|
7
|
if (exec.which(`xcpretty`)) {
|
5
|
8
|
exec.execSync(`${cmd} | xcpretty && exit \${PIPESTATUS[0]}`);
|
|
@@ -9,22 +12,26 @@ function runWithXcpretty(cmd) {
|
9
|
12
|
}
|
10
|
13
|
|
11
|
14
|
function run() {
|
|
15
|
+ const conf = release ? `Release` : `Debug`;
|
12
|
16
|
runWithXcpretty(`RCT_NO_LAUNCH_PACKAGER=true
|
13
|
17
|
cd ./playground/ios && xcodebuild
|
14
|
18
|
build build-for-testing
|
15
|
19
|
-scheme "ReactNativeNavigation"
|
16
|
20
|
-project playground.xcodeproj
|
17
|
21
|
-sdk iphonesimulator
|
18
|
|
- -configuration Debug
|
19
|
|
- -derivedDataPath ./DerivedData/playground`);
|
|
22
|
+ -configuration ${conf}
|
|
23
|
+ -derivedDataPath ./DerivedData/playground
|
|
24
|
+ ONLY_ACTIVE_ARCH=YES`);
|
20
|
25
|
runWithXcpretty(`RCT_NO_LAUNCH_PACKAGER=true
|
21
|
26
|
cd ./playground/ios && xcodebuild
|
22
|
27
|
test-without-building
|
23
|
28
|
-scheme "ReactNativeNavigation"
|
24
|
29
|
-project playground.xcodeproj
|
25
|
30
|
-sdk iphonesimulator
|
|
31
|
+ -configuration ${conf}
|
26
|
32
|
-destination 'platform=iOS Simulator,name=iPhone 7'
|
27
|
|
- -derivedDataPath ./DerivedData/playground`);
|
|
33
|
+ -derivedDataPath ./DerivedData/playground
|
|
34
|
+ ONLY_ACTIVE_ARCH=YES`);
|
28
|
35
|
}
|
29
|
36
|
|
30
|
37
|
run();
|