|
@@ -16,16 +16,16 @@ function buildProjForDetox() {
|
16
|
16
|
-sdk iphonesimulator
|
17
|
17
|
-derivedDataPath ./DerivedData/playground`;
|
18
|
18
|
|
19
|
|
- if (hasXcpretty()) {
|
|
19
|
+ if (isInstalled(`xcpretty`)) {
|
20
|
20
|
shellUtils.exec.execSync(`${cmd} | xcpretty && exit \${PIPESTATUS[0]}`);
|
21
|
21
|
} else {
|
22
|
22
|
shellUtils.exec.execSync(`${cmd}`);
|
23
|
23
|
}
|
24
|
24
|
shellUtils.exec.execSync(`echo 'travis_fold:end:xcodebuild'`);
|
25
|
25
|
}
|
26
|
|
-function hasXcpretty() {
|
|
26
|
+function isInstalled(what) {
|
27
|
27
|
try {
|
28
|
|
- return shellUtils.exec.execSyncRead(`which xcpretty`);
|
|
28
|
+ return shellUtils.exec.execSyncRead(`which ${what}`);
|
29
|
29
|
} catch (e) {
|
30
|
30
|
return false;
|
31
|
31
|
}
|
|
@@ -56,7 +56,14 @@ function e2e() { //eslint-disable-line
|
56
|
56
|
}
|
57
|
57
|
}
|
58
|
58
|
|
|
59
|
+function installFbsimctlIfNeeded() {
|
|
60
|
+ if (!isInstalled(`fbsimctl`)) {
|
|
61
|
+ shellUtils.exec.execSync(`brew tap facebook/fb && brew install fbsimctl`);
|
|
62
|
+ }
|
|
63
|
+}
|
|
64
|
+
|
59
|
65
|
function run() {
|
|
66
|
+ installFbsimctlIfNeeded();
|
60
|
67
|
buildProjForDetox();
|
61
|
68
|
e2e();
|
62
|
69
|
}
|