问题描述
我的问题与 iTunes Connect 中版本和内部版本号的限制有关.我们只允许 3 个非负整数,并且 Build 号必须是递增的.
My question relates to the restrictions in iTunes Connect for Version and Build number. We are only allowed 3 non-negative integers and the Build number has to be incremental.
我正在设置一个 Jenkins 作业来自动将我的构建上传到 iTunes Connect,以便测试人员可以下载它们.
I am setting up a Jenkins job to automatically upload my builds to iTunes Connect so that testers can then download them.
问题:我们如何确保增量构建号?即使我们在每次提交之前在 Xcode 中手动更改它(这似乎是错误的),也有不止一个开发人员在处理该项目,因此我们无法在整个团队中同步我们的提交和增量数字.
Problem: How do we ensure an incremental build number? Even if we did manually change it in Xcode before every commit (which seems wrong) there are more than one dev working on the project so there is no way we can all sync our commits and incremental numbers across the team.
很高兴:我的团队在多个分支机构工作.如果我可以在 Build 字段中指定分支名称或其他一些描述,那将会很有帮助.在独立试飞(将于 2015 年 2 月下旬弃用)中,我们可以上传包含一些字母的构建.
Nice to have: My team works in several branches. It would be helpful if I could specify the branch name or some other description in the Build field. In the stand alone Test Flight (to be deprecated end of Feb 2015), we could upload a build with some letters.
会喜欢这里的一些输入!
Would love some input here!
如果 iTunes Connect Test Flight 不是分发测试版本的答案,那么人们还使用哪些其他服务?
And if iTunes Connect Test Flight is not the answer to distribute test builds, what other services are people using?
谢谢!
推荐答案
在 Jenkins 中,有一个 $BUILD_NUMBER 参数可以持续工作的生命周期.您可以将其附加到 info.plist 中内部版本号参数的末尾.如果 info.plist 中内部版本号的开头是 3.1.那么你的真实内部版本号变成了 3.1.$BUILD_NUMBER 来自 Jenkins.有一个程序叫 plist_buddy (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/PlistBuddy.8.html) 可用于编辑 info.plist 文件.
In Jenkins there is a $BUILD_NUMBER parameter that lasts the life of the job. You can append this to the end of the build number parameter in the info.plist. If the beginning of the build number in info.plist is 3.1. then your real build number becomes 3.1.$BUILD_NUMBER from Jenkins. There's a program called plist_buddy (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/PlistBuddy.8.html) which you can use to edit the info.plist file.
序列中是否存在间隙并不重要,只要它在递增.3.1.部分将被手动管理,以便首席开发人员在发布开始时增加它.这种方法假设您有 1 份工作要做构建.如果您有多个作业在构建同一个应用程序,您可能会使用 Unix 格式的日期/时间之类的东西,这是一个很大的数字,通常不会倒退.
It really doesn't matter if there are gaps in the sequence as long as it's incrementing. The 3.1. part would be manually managed so that the lead developer increments that at the beginning of a release. This approach assumes that you've got 1 job to do the build. If you have multiple jobs doing builds of the same app you could possibly use something like the date/time in Unix format, it's a large number and usually doesn't go backwards.
这篇关于iTunesConnect TestFlight 的 iOS 应用程序版本和内部版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!