Skip to content

Commit

Permalink
Update build phases example to propagate errors to Xcode (#2260)
Browse files Browse the repository at this point in the history
Without the explicit propagation I wasn't seeing errors in Xcode.

Build phase shell env: `/bin/sh`
Xcode version: `Version 13.2.1 (13C100)`
  • Loading branch information
adam-zethraeus authored May 3, 2022
1 parent 90d2c34 commit 51c686f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/source/swift-scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ This is best achieved with a Run Script Build Phase.
cd "${SRCROOT}"/ApolloCodegen
xcrun -sdk macosx swift run ApolloCodegen generate
# propagate the xcrun call's return code to Xcode
exit $?
```
>**Note**: If your package ever seems to have problems with caching, run `swift package clean` before `swift run` for a totally clean build. Do not do this by default, because it substantially increases build time.
Expand Down

0 comments on commit 51c686f

Please sign in to comment.