Skip to content

Commit

Permalink
build: correctly pass exit code of xcodebuild through pipeline
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mikehardy committed Mar 12, 2021
1 parent 935dbc3 commit ee40f50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ jobs:
export SKIP_BUNDLING=1
export RCT_NO_LAUNCH_PACKAGER=1
cd tests
set -o pipefail
./node_modules/.bin/detox build --configuration ios.ci
shell: bash

Expand Down
6 changes: 3 additions & 3 deletions tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/testing.app",
"build": "xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty -k",
"build": "set -o pipefail && xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty -k",
"type": "ios.simulator",
"device": {
"type": "iPhone 8"
}
},
"ios.ci": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/testing.app",
"build": "xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES | xcpretty -k",
"build": "set -o pipefail && xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES | xcpretty -k",
"type": "ios.simulator",
"device": {
"type": "iPhone 11"
Expand All @@ -76,7 +76,7 @@
},
"ios.sim.release": {
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/testing.app",
"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",
"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",
"type": "ios.simulator",
"device": {
"type": "iPhone X"
Expand Down

0 comments on commit ee40f50

Please sign in to comment.