如何将 bzr revid 放入清单的 Android:versionName
我在 Linux Ubuntu 服务器上使用 Jenkins 构建 Android 应用程序,并使用 Bazaar 作为 SCM。
我想自动将项目的集市修订 ID 添加到清单文件中的 Android:versionName 值中。
我使用 ant 来构建,并且有 Jenkin 的 bazaar 插件,可以将 revid 传递给 ant 构建脚本,但我不知道该怎么做。
I build my Android apps with Jenkins on a Linux Ubuntu server and uses Bazaar as SCM.
I'd like to automatically append the bazaar revision id of the project to the value of Android:versionName in my manifest file.
I use ant to build and I have the Jenkin's bazaar plugin that passes the revid to the ant build script, but I have no idea how to do that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我终于在此处找到了解决方案。
它是针对 SVN 的,但针对 Bazaar 进行调整已经很容易了...
这是我的任务的样子。
如果 versionName 是 1.5.2,il 会将其替换为 1.5.2.r123(其中 123 是 Bazaar 修订号)。您可以根据需要调整正则表达式。
I finally found a solution here.
It was for SVN, but it has been easy enough to tune for Bazaar...
Here is how my task look like.
If versionName is 1.5.2, il will replace it with 1.5.2.r123 (where 123 is the Bazaar revision number). You can tune the regex to your needs.