如何获取xcodebuild的返回值? [英] How to get the return value of xcodebuild?

查看:74
本文介绍了如何获取xcodebuild的返回值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在持续集成服务器上的 bash 脚本中使用 xcodebuild.

I'm using xcodebuild inside a bash script on a continuous integration server.

我想知道脚本中的构建何时失败,以便我可以提前退出并将构建标记为失败.

I would like to know when a build as failed in the script, so I can exit prematurely from it and mark the build as failed.

xcodebuild 向控制台显示 BUILD FAILED 消息,但我没有成功获取返回值.

xcodebuild displays a BUILD FAILED message to the console, but I don't succeed in getting a return value.

我怎样才能做到这一点?

How can I achieve this?

提前致谢

推荐答案

我使用这个命令解决了我的问题:xcodebuild -... ||出口1

I solved my problem using this command: xcodebuild -... || exit 1

这篇关于如何获取xcodebuild的返回值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆