Skip to content

Commit ee40f50

Browse files
committed
build: correctly pass exit code of xcodebuild through pipeline
without this, the xcodebuild commands could fail and you would still get a clean exit code, so CI (for example) would pass even though the iOS build failed
1 parent 935dbc3 commit ee40f50

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/tests_e2e.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ jobs:
300300
export SKIP_BUNDLING=1
301301
export RCT_NO_LAUNCH_PACKAGER=1
302302
cd tests
303+
set -o pipefail
303304
./node_modules/.bin/detox build --configuration ios.ci
304305
shell: bash
305306

tests/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252
"configurations": {
5353
"ios.sim.debug": {
5454
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/testing.app",
55-
"build": "xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty -k",
55+
"build": "set -o pipefail && xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty -k",
5656
"type": "ios.simulator",
5757
"device": {
5858
"type": "iPhone 8"
5959
}
6060
},
6161
"ios.ci": {
6262
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/testing.app",
63-
"build": "xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES | xcpretty -k",
63+
"build": "set -o pipefail && xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES | xcpretty -k",
6464
"type": "ios.simulator",
6565
"device": {
6666
"type": "iPhone 11"
@@ -76,7 +76,7 @@
7676
},
7777
"ios.sim.release": {
7878
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/testing.app",
79-
"build": "export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty -k",
79+
"build": "set -o pipefail && export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty -k",
8080
"type": "ios.simulator",
8181
"device": {
8282
"type": "iPhone X"

0 commit comments

Comments
 (0)