让 shell 脚本引用 XCode 构建路径
我有一个 shell 脚本,可以在我拥有 Hudson 的 iOS 项目上运行 lcov (测试覆盖率)。 Hudson 的该项目副本源自 Git 存储库。我现在设置的方式是,每当存储库更新或有人在 Hudson 中手动构建项目时,Hudson 都会自动运行该应用程序,然后在构建完成后运行我的 shell 脚本。 lcov 只能在应用程序构建完成后才能运行,而且会通过一些功能测试工具自动运行。因此,我无法通过 XCode 将 shell 脚本作为构建过程的一部分运行。它必须在应用程序完成构建和运行后运行。
但是,我想在多个 Hudson 工作中使用这个项目。不幸的是,在每个 Hudson 作业中,iOS 项目的命名都不同。我想使用某种环境变量来引用构建路径,但我不知道如何操作。有人对如何找到它有任何提示吗?
I have a shell script that runs lcov (test coverage) on an iOS project that I have Hudson. Hudson's copy of this project is derived from a Git repository. The way that I have set up now is that whenever the repo is updated or if someone manually builds the project in Hudson, Hudson would automatically run the app, and then run my shell script after the build is done. lcov can only be run after the app is not only built, but automatically run with some functional test tools. So, I cannot run the shell script as part of the build process, through XCode. It must be run after the app finishes building and running.
However, I would like to use this project in multiple Hudson jobs. Unfortunately, in each Hudson job, the iOS project is named differently. I would like to refer to the build path with some sort of environmental variable, but I don't know how to. Does anyone have any tips as to how to find that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解正确的话,这确实是一个哈德逊问题。您可以在 Hudson 配置中设置“全局变量”,然后调用 shell 脚本、批处理文件、ant 构建等。您还可以在每次调用 Hudson 作业时动态设置它们。如果没有更多信息,不确定如何在您的特定环境中为您提供帮助。
If I understand you correctly this is really a Hudson question. You can set "global variables" in your Hudson config and then invoke shell scripts, batch files, ant builds etc. You can also set them dynamically on each invocation of your Hudson job. Not sure exactly how to help you in your specific environment without more info.