Browse Source

Fix build scripts

Seems like CI env variable is obsolete
Guy Carmeli 6 years ago
parent
commit
174dd6dace
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      scripts/test-e2e.js

+ 3
- 3
scripts/test-e2e.js View File

14
     const prefix = android ? `android.emu` : `ios.sim`;
14
     const prefix = android ? `android.emu` : `ios.sim`;
15
     const suffix = release ? `release` : `debug`;
15
     const suffix = release ? `release` : `debug`;
16
     const configuration = `${prefix}.${suffix}`;
16
     const configuration = `${prefix}.${suffix}`;
17
-    const cleanup = process.env.CI ? `--cleanup` : ``;
18
     const headless$ = android ? headless ? `--headless` : `` : ``;
17
     const headless$ = android ? headless ? `--headless` : `` : ``;
19
     const workers = multi ? 3 : 1;
18
     const workers = multi ? 3 : 1;
20
     
19
     
21
-    if (platform === 'android' && process.env.CI) {
20
+    console.log('guyca', `CI: ${process.env.CI} JENKINS_CI: ${process.env.JENKINS_CI}`)
21
+    if (platform === 'android' && process.env.JENKINS_CI) {
22
         const sdkmanager = '/usr/local/share/android-sdk/tools/bin/sdkmanager';
22
         const sdkmanager = '/usr/local/share/android-sdk/tools/bin/sdkmanager';
23
         exec.execSync(`echo y | ${sdkmanager} --update && echo y | ${sdkmanager} --licenses`);
23
         exec.execSync(`echo y | ${sdkmanager} --update && echo y | ${sdkmanager} --licenses`);
24
     }
24
     }
26
     if (!skipBuild) {
26
     if (!skipBuild) {
27
         exec.execSync(`detox build --configuration ${configuration}`);
27
         exec.execSync(`detox build --configuration ${configuration}`);
28
     }
28
     }
29
-    exec.execSync(`detox test --configuration ${configuration} --platform ${platform} ${cleanup} ${headless$} ${!android ? `-w ${workers}` : ``}`); //-f "ScreenStyle.test.js" --loglevel trace
29
+    exec.execSync(`detox test --configuration ${configuration} --platform ${platform} ${headless$} ${!android ? `-w ${workers}` : ``}`); //-f "ScreenStyle.test.js" --loglevel trace
30
 }
30
 }