当前位置:网站首页>Version number naming convention

Version number naming convention

2022-06-21 12:13:00 Summer foam and light rain

Write it at the front :

The purpose of this article is to summarize backup 、 For future reference , Because it's a personal summary , If there is any wrong , Welcome to correct ; in addition , Most of the content comes from the Internet 、 Books 、 And all kinds of manuals , In case of infringement, please inform , Immediately delete the post and apologize .


original text :http://wsfdl.com/devops/2016/09/27/%E7%89%88%E6%9C%AC%E5%8F%B7.html#

First look at the version numbers of some common software :

  • Linux Kernel: 0.0.1,1.0.0,2.6.32,3.0.18…, If use X.Y.Z Express , Then even number Y Stable version , Odd number Y Represents the development version .
  • Windows:windows 98,windows 2000,windows xp,windows 7…, The biggest feature is disorder , No rules .
  • SSH Client:0.9.8.
  • OpenStack:2014.1.3,2015.1.1.dev8.

And you can see that , Different software version numbers have different styles , As the scale of the system grows , The more software you rely on , If the software doesn't follow a standard naming style , Easy to cause Dependency Hell. So when we release the version , The naming of the version number needs to follow some rules , among Semantic Versioning 2.0.0 A set of simple rules and conditions are defined to restrict the configuration and growth of version number . This article is based on Semantic Versionning 2.0.0 and Semantic Versioning 3.0.0 The selective arrangement publishes this number naming rule guide .


Version number naming rules guide

The format of the version number is X.Y.Z( also called Major.Minor.Patch), The rule of increment is :

  • X Indicates the major version number , When API When the compatibility of ,X Need to increase .
  • Y Indicates the minor version number , When adding features ( No effect API The compatibility of ),Y Need to increase .
  • Z Indicates revision number , treat as Bug When repairing ( No effect API The compatibility of ),Z Need to increase .

The detailed rules are as follows :

  1. X, Y, Z Must be a non negative integer , And must not contain leading zeros , It has to be incremented by a number , Such as 1.9.0 -> 1.10.0 -> 1.11.0
  2. 0.Y.Z The version number of indicates that the software is in the initial development stage , signify API It could be unstable ;1.0.0 Indicates that the version has a stable API.
  3. When API When the compatibility of ,X Must be incremented ,Y and Z Also set to 0; When new features are added ( No effect API The compatibility of ) perhaps API Marked as
    Deprecated when ,Y Must be incremented , meanwhile Z Set to 0; When doing bug fix when ,Z Must be incremented .
  4. Advance version number (Pre-release) It means that the version is unstable , There may be compatibility issues , The format for :X.Y.Z.[a-c][ Positive integer ], Such as 1.0.0.a1,1.0.0.b99,1.0.0.c1000.
  5. The development version number is often used for CI-CD, The format is X.Y.Z.dev[ Positive integer ], Such as 1.0.1.dev4.
  6. Version numbers are sorted by comparing major version numbers in turn 、 Values of minor version number and revision number , Such as 1.0.0 < 1.0.1 < 1.1.1 < 2.0.0; For antecedent version number and development version number , Yes :1.0.0.a100 < 1.0.0,2.1.0.dev3 < 2.1.0; When there are letters , With ASCII To compare , Such as 1.0.0.a1 < 1.0.0.b1.
  7. Be careful : Once the version is released , Its contents shall not be modified , Any changes must be released in a new version !

Some of the embellishments

  • alpha: Internal version
  • beta: The beta
  • demo: Demo version
  • enhance: Enhanced version
  • free: Free Edition
  • full version: Full version , The official version
  • lts: Long term maintenance version
  • release: Distribution version
  • rc: It's going to be released as an official version
  • standard: The standard version
  • ultimate: Flagship Edition
  • upgrade: Upgraded version
原网站

版权声明
本文为[Summer foam and light rain]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206211158515416.html