需要有关版本号方案的帮助
我知道标准的 Major.Minor.Build.Revision,但我们有几个有些独特的考虑因素
- 我们几乎每天都会进行内部发布,有时每天不止一次。
-Windows Installer 不检查修订 所以这对于我们的目的来说几乎毫无意义。
- 理想情况下,主要和次要数字仅针对公开发布进行更新,并且应手动完成。
- 剩下的构建号需要自动更新。
-我们希望内部发布能够在任何开发人员的机器上执行,这样就不用在 Visual Studio 中使用 xx*,因为不同的机器可能会生成不同的数字,并且每个构建都不能保证比前一个更大。
-我们有大约 15 个左右的项目作为产品的一部分,因此在 SVN 中保存版本号并不理想,因为每个版本我们都会提交所有这些文件。
考虑到这些标准,我真的无法想出一个好的版本控制方案。最后两个标准可以放弃,但满足所有这些标准似乎是理想的。日期戳是不够的,因为我们每天可能会做不止一个,并且考虑到 Uint16 的最大大小(大约 64000)(实际上使用 WiX 它会抱怨数字高于 Int16.MaxValue),日期/时间将不适合。
I know the standard Major.Minor.Build.Revision but there's several considerations for us that are somewhat unique
-We do internal releases almost daily, occasionally more than once a day.
-Windows Installer doesn't check Revision so that's almost moot for our purposes.
-Major and Minor numbers ideally are only updated for public releases and should be done manually.
-That leaves the Build # that needs to be automatically updated.
-We want internal releases to be able to be performed from any developer's machine so that leaves out using x.x.* in Visual Studio because different numbers could be generated from different machines and each build isn't guaranteed to be larger than the previous.
-We have about 15 or so projects as part of the product so saving the version numbers in SVN isn't ideal since every release we'd have commit all those files.
Given those criteria I can't really come up with a good versioning scheme. The last 2 criteria could be dropped but meeting all of those seems ideal. A date stamp is insufficient because we might do more than one a day, and given the max size of Uint16 (around 64000) (Actually using WiX it complains about numbers higher than Int16.MaxValue) a date/time won't fit.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此外,Uint32 不限于 2^16 (65535),它的 32 位为您提供 2^32,或大约 40 亿。
git describe
output, which is perfect in most cases). Builds should be traceable - its important to only build from committed sources if you want to actually be able to determine what you are running.Also, Uint32 is not limited to 2^16 (65535), its 32 bit giving you 2^32, or roughly 4 billion.
由于 msi 不检查修订版本,因此我们在 msi 的构建系统中切换了第三和第四版本部分。
例如,如果真实版本是 1.2.3.4678(4678 是构建应用程序的 SVN 版本),我们将 msi 版本创建为 1.2.4678.3。
Since msi doesn't check revisions, we switched the third and fourth version part in our build system for the msi.
For example, if the real version is 1.2.3.4678 (the 4678 is the SVN revision the app is built from), we create the msi version as 1.2.4678.3.