Browse Source

travis log not working

Daniel Zlotin 7 years ago
parent
commit
ffa3540f8a
3 changed files with 20 additions and 13 deletions
  1. 2
    2
      scripts/release.js
  2. 3
    11
      src/commands/Commands.js
  3. 15
    0
      src/commands/LayoutBuilder.js

+ 2
- 2
scripts/release.js View File

@@ -20,12 +20,12 @@ function validateEnv() {
20 20
   }
21 21
 
22 22
   if (process.env.TRAVIS_BRANCH !== 'master') {
23
-    console.error(`not publishing on branch ${process.env.TRAVIS_BRANCH}`);
23
+    console.log(`not publishing on branch ${process.env.TRAVIS_BRANCH}`);
24 24
     return false;
25 25
   }
26 26
 
27 27
   if (process.env.TRAVIS_PULL_REQUEST !== 'false') {
28
-    console.error(`not publishing as triggered by pull request ${process.env.TRAVIS_PULL_REQUEST}`);
28
+    console.log(`not publishing as triggered by pull request ${process.env.TRAVIS_PULL_REQUEST}`);
29 29
     return false;
30 30
   }
31 31
 

+ 3
- 11
src/commands/Commands.js View File

@@ -1,19 +1,11 @@
1 1
 import _ from 'lodash';
2 2
 import {NativeModules} from 'react-native';
3 3
 const {NativeNavigation} = NativeModules;
4
-import {uniqueId} from '../providers/UniqueIdProvider';
4
+import * as LayoutBuilder from './LayoutBuilder';
5 5
 
6 6
 export function startApp(params) {
7
-  params.container.id = uniqueId(`container`);
8
-  if (params.sideMenu) {
9
-    if (params.sideMenu.left) {
10
-      params.sideMenu.left.id = uniqueId(`container`);
11
-    }
12
-    if (params.sideMenu.right) {
13
-      params.sideMenu.right.id = uniqueId(`container`);
14
-    }
15
-  }
16
-  NativeNavigation.startApp(params);
7
+  const layout = LayoutBuilder.parse(params);
8
+  NativeNavigation.startApp(layout);
17 9
 }
18 10
 //
19 11
 //function parseParams(params) {

+ 15
- 0
src/commands/LayoutBuilder.js View File

@@ -0,0 +1,15 @@
1
+import {uniqueId} from '../providers/UniqueIdProvider';
2
+
3
+export function parse(params) {
4
+  const layout = params;
5
+  layout.container.id = uniqueId(`container`);
6
+  if (layout.sideMenu) {
7
+    if (layout.sideMenu.left) {
8
+      layout.sideMenu.left.id = uniqueId(`container`);
9
+    }
10
+    if (layout.sideMenu.right) {
11
+      layout.sideMenu.right.id = uniqueId(`container`);
12
+    }
13
+  }
14
+  return layout;
15
+}