简体   繁体   English

何时在发布管理周期中增加版本号

[英]When to increment a version number in the Release management cycle

We use a combination of GitHub, TeamCity, CodeReviews, Octopus deploy to manage our overall Release Management process. 我们结合使用GitHub,TeamCity,CodeReviews和Octopus部署来管理我们的整体发布管理流程。 We develop websites, and several internally used API's. 我们开发网站和几个内部使用的API。

We're looking to implement better versioning of our API's in-particular and will use Semver. 我们正在寻求更好地实现我们的API版本,并将使用Semver。

My question is, at which stage do you assign a version number to it? 我的问题是,你在哪个阶段为其分配版本号?

Example: 例:

  • Current version in Master is 1.2.1 Master中的当前版本是1.2.1
  • User creates branch (Branch2) to implement some new functionality 用户创建分支(Branch2)以实现一些新功能
  • User deploys Branch2 into QA for review and sign-off 用户将Branch2部署到QA中以进行审核和签核
  • User merges Branch2 into Master and Releases to Production. 用户将Branch2合并为Master并发布到Production。

At what stage should the version have been incremented to 1.3.0? 版本应该在什么阶段增加到1.3.0? If it is updated at the stage when it goes into QA, it is possible that another developer in the meantime creates another feature branch which is tested and ready for Release into Production much quicker than Branch2 was - so really the later should have been 1.3.0 whereas Branch2 which will be pushed out to Production weeks later should have [possibly been 1.4.0. 如果它在进入QA的阶段更新,那么同时另一个开发人员可能会创建另一个功能分支,该分支经过测试并准备好比分发2更快地发布到生产中 - 所以真的后者应该是1.3。 0而将在几周后推出生产的Branch2应该[可能是1.4.0。

So, am i right in thinking that the version number should only be incremented once QA has been signed off, and prior to the final merge back into the Master branch? 那么,我是否正确地认为版本号只应在QA签署后增加,并在最终合并回主分支之前?

Thanks for your time in advance Regards, dotdev 感谢您提前的时间问候,dotdev

As you describe I see these versions: 如您所述,我看到这些版本:

  • 1.2.1 Current version in Master is 1.2.1 1.2.1 Master中的当前版本为1.2.1
  • 1.3.0-alpha+branch2 User creates branch (Branch2) to implement some new functionality 1.3.0-alpha+branch2用户创建分支(Branch2)以实现一些新功能
  • 1.3.0-beta+branch2 User deploys Branch2 into QA for review and sign-off 1.3.0-beta+branch2用户将Branch2部署到QA中以进行审核和签核
  • 1.3.0 User merges Branch2 into Master and Releases to Production. 1.3.0用户将Branch2合并为Master并发布到Production。

Increment to the next version must be done immediately after any official/production release. 任何正式/生产版本发布后, 必须立即增加下一版本。 Here is a sketch that could help. 这是一个可以帮助的草图。

feature                           *-(1.3.0-beta+feature1)---*                            *-(1.4.0-beta+feature2)--
                                 /                           \                          /
 master  -[v1.2.1]-(1.3.0-beta)-*-----------------------------*-[v1.3.0]-(1.4.0-beta)--*-----
           \                                                     \      
release     *----                                                 *---

You manually apply tags to official releases represented by square brackets, while the version (normal parenthesis) takes in account tags in history. 您手动将标记应用于由方括号表示的正式版本,而版本(正常括号)在历史记录中包含帐户标记。

I suggest to take a look at the wonderful GitVersion tool to help you in managing the calculation. 我建议你看看精彩的GitVersion工具来帮助你管理计算。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM