Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ead300d

Browse files
committedJul 25, 2019
App RN build system.
1 parent c5d97a1 commit ead300d

File tree

4 files changed

+39
-32
lines changed

4 files changed

+39
-32
lines changed
 

‎.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ matrix:
22
include:
33
- os: osx
44
language: objective-c
5-
osx_image: xcode9.4
5+
osx_image: xcode10.2
66
env:
77
- OS: 'ios'
88

99
- os: linux
1010
language: android
1111
jdk: oraclejdk8
1212
sudo: required
13+
before_script:
14+
- echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
1315
android:
1416
components:
1517
- platform-tools
@@ -42,7 +44,7 @@ script:
4244
- source ~/.nvm/nvm.sh
4345

4446
# Installi a lts version of Node
45-
- nvm install --lts
47+
- nvm install 11.6.0
4648

4749
# Run build script
4850
- npm run ci

‎example/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
},
1212
"dependencies": {
1313
"react": "16.5.0",
14-
"react-native": "0.57.0",
14+
"react-native": "0.57.8",
1515
"tipsi-travis-scripts": "file:../tipsi-travis-scripts-latest.tgz"
1616
},
1717
"devDependencies": {
18-
"appium": "1.8.1",
18+
"appium": "1.14.0",
1919
"babel-jest": "23.6.0",
2020
"metro-react-native-babel-preset": "0.45.2",
2121
"jest": "23.6.0",
2222
"react-test-renderer": "16.5.0",
2323
"tape-async": "2.3.0",
24-
"tipsi-appium-helper": "3.0.0",
25-
"webdriverio": "4.7.1",
24+
"tipsi-appium-helper": "tipsi/tipsi-appium-helper#7d7a77e5e8a17bcca33fc12222db93edd8bf4f3a",
25+
"webdriverio": "5.11.7",
2626
"wml": "0.0.83"
2727
},
2828
"jest": {

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tipsi-travis-scripts",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Scripts to run builds and tests for 3rd-party modules on Travis CI",
55
"main": "index.js",
66
"scripts": {

‎scripts/buildIOS.js

+30-25
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,44 @@ import log from './utils/log'
1212

1313
const isProjectUsingPods = config.get('usePods')
1414

15-
function buildIOSProject(projectPath) {
16-
const iosFolder = path.resolve(projectPath, 'ios')
17-
const whatToBuild = isProjectUsingPods
18-
? '-workspace example.xcworkspace'
19-
: '-project example.xcodeproj'
15+
function buildIOSProject(projectPath, isReactNativeBuild) {
16+
if (isReactNativeBuild) {
17+
run('react-native run-ios --simulator="iPhone 6" --configuration=release', projectPath)
18+
} else {
19+
const iosFolder = path.resolve(projectPath, 'ios')
20+
const whatToBuild = isProjectUsingPods
21+
? '-workspace example.xcworkspace'
22+
: '-project example.xcodeproj'
2023

21-
log('RUN RELEASE BUILD', 'info')
22-
const xcodebuildArguments = [
23-
'build',
24-
whatToBuild,
25-
'-scheme example',
26-
'-configuration Release',
27-
'-sdk iphonesimulator',
28-
"-destination 'platform=iOS Simulator,name=iPhone 6'",
29-
'-derivedDataPath build',
30-
'ONLY_ACTIVE_ARCH=NO',
31-
"OTHER_LDFLAGS='$(inherited) -ObjC -lc++'",
32-
].join(' ')
24+
log('RUN RELEASE BUILD', 'info')
25+
const xcodebuildArguments = [
26+
'build',
27+
whatToBuild,
28+
'-scheme example',
29+
'-configuration Release',
30+
'-sdk iphonesimulator',
31+
"-destination 'platform=iOS Simulator,name=iPhone 6'",
32+
'-derivedDataPath build',
33+
'ONLY_ACTIVE_ARCH=NO',
34+
'-UseModernBuildSystem=NO',
35+
"OTHER_LDFLAGS='$(inherited) -ObjC -lc++'",
36+
].join(' ')
3337

34-
const formatter = commandExists.sync('xcpretty') ? '| xcpretty' : ''
35-
run(`xcodebuild ${xcodebuildArguments} ${formatter}`, iosFolder)
38+
const formatter = commandExists.sync('xcpretty') ? '| xcpretty' : ''
39+
run(`xcodebuild ${xcodebuildArguments} ${formatter}`, iosFolder)
40+
}
3641
}
3742

38-
export default function buildIOS() {
43+
export default function buildIOS(isReactNativeBuild = false) {
3944
if (IS_MACOS && IS_IOS) {
40-
log('', 'empty') // only for beautiful stdout
41-
log('BUILD IOS DEFAULT')
42-
buildIOSProject(DEFAULT_TESTS_FOLDER)
43-
4445
if (isProjectUsingPods) {
4546
log('', 'empty') // only for beautiful stdout
4647
log('BUILD IOS PODSPEC')
47-
buildIOSProject(PODSPEC_TESTS_FOLDER)
48+
buildIOSProject(PODSPEC_TESTS_FOLDER, isReactNativeBuild)
49+
} else {
50+
log('', 'empty') // only for beautiful stdout
51+
log('BUILD IOS DEFAULT')
52+
buildIOSProject(DEFAULT_TESTS_FOLDER, isReactNativeBuild)
4853
}
4954

5055
log('', 'empty') // only for beautiful stdout

0 commit comments

Comments
 (0)
This repository has been archived.