ソースを参照

fixing travis and ignore react warnings

Daniel Zlotin 7 年 前
コミット
9513684fc7
共有3 個のファイルを変更した17 個の追加0 個の削除を含む
  1. 14
    0
      playground/scripts/ignoreReactWarnings.rb
  2. 1
    0
      playground/scripts/postinstall.js
  3. 2
    0
      scripts/test.ios.js

+ 14
- 0
playground/scripts/ignoreReactWarnings.rb ファイルの表示

@@ -0,0 +1,14 @@
1
+#!/usr/bin/env ruby
2
+
3
+require 'pathname'
4
+
5
+$LOAD_PATH.unshift(__dir__ + "/../node_modules/detox/scripts/Xcodeproj/lib")
6
+$LOAD_PATH.unshift(__dir__ + "/../node_modules/detox/scripts/Nanaimo/lib")
7
+
8
+require 'xcodeproj'
9
+
10
+project = Xcodeproj::Project.open(__dir__ + "/../node_modules/react-native/React/React.xcodeproj")
11
+
12
+project.build_configuration_list['Release'].build_settings['WARNING_CFLAGS'] = ['-Wno-shorten-64-to-32','-Wno-unused-parameter','-Wno-unreachable-code','-Wno-deprecated-declarations','-Wno-extra-tokens','-Wno-unused-variable','-Wno-incompatible-pointer-types','-Wno-conditional-uninitialized','-Wno-undeclared-selector','-Wno-objc-protocol-property-synthesis']
13
+
14
+raise "Error: Unable to save Xcode project" unless project.save()

+ 1
- 0
playground/scripts/postinstall.js ファイルの表示

@@ -3,3 +3,4 @@ const shellUtils = require('shell-utils');
3 3
 shellUtils.exec.execSync(`rm yarn.lock`);
4 4
 shellUtils.exec.execSync(`rm -rf node_modules/react-native-navigation/node_modules`);
5 5
 shellUtils.exec.execSync(`rm -rf node_modules/react-native-navigation/playground`);
6
+shellUtils.exec.execSync(`./scripts/ignoreReactWarnings.rb`);

+ 2
- 0
scripts/test.ios.js ファイルの表示

@@ -3,6 +3,8 @@ const exec = require('shell-utils').exec;
3 3
 function run() {
4 4
   process.chdir('./playground');
5 5
   exec.execSync(`hardlink node_modules/react-native-navigation/ -u || true`);
6
+  const yarnCacheDir = exec.execSyncRead(`yarn cache dir`);
7
+  exec.execSync(`rm -rf ${yarnCacheDir}/*navigation*`);
6 8
   exec.execSync(`yarn install`);
7 9
   exec.execSync(`yarn run e2e release`);
8 10
   process.chdir('../');