Browse Source

fixing travis and ignore react warnings

Daniel Zlotin 7 years ago
parent
commit
9513684fc7

+ 14
- 0
playground/scripts/ignoreReactWarnings.rb View File

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 View File

3
 shellUtils.exec.execSync(`rm yarn.lock`);
3
 shellUtils.exec.execSync(`rm yarn.lock`);
4
 shellUtils.exec.execSync(`rm -rf node_modules/react-native-navigation/node_modules`);
4
 shellUtils.exec.execSync(`rm -rf node_modules/react-native-navigation/node_modules`);
5
 shellUtils.exec.execSync(`rm -rf node_modules/react-native-navigation/playground`);
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 View File

3
 function run() {
3
 function run() {
4
   process.chdir('./playground');
4
   process.chdir('./playground');
5
   exec.execSync(`hardlink node_modules/react-native-navigation/ -u || true`);
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
   exec.execSync(`yarn install`);
8
   exec.execSync(`yarn install`);
7
   exec.execSync(`yarn run e2e release`);
9
   exec.execSync(`yarn run e2e release`);
8
   process.chdir('../');
10
   process.chdir('../');