Is there any way to check if xcodebuild
is successful in the post-action
shell?
I want to run a custom script only when the build succeeds.
I checked env vars with the set
command in the post-action
shell, but couldn’t find a suitable var.
Is there any way to check if xcodebuild
is successful in the post-action
shell?
I want to run a custom script only when the build succeeds.
I checked env vars with the set
command in the post-action
shell, but couldn’t find a suitable var.
2
Answers
In Xcode’s post-action script, you don’t have direct access to the exit status of the xcodebuild command.
I not sure about this but you can check the existence of the generated build for example your app bundle. To infer whether the build succeeded.
You can use
post-action
ofArchive
action. It’s called only if build was successful