你推荐什么版本的编号方案?

时间:2021-05-24 06:50:13

My question is, which version-naming scheme should be used for what type of project.

我的问题是,哪种版本命名方案应该用于什么类型的项目。

Very common is major.minor.fix, but even this can lead to 4 number (i.e. Firefox 2.0.0.16). Some have a model that odd numbers indicate developer-versions and even numbers stable releases. And all sorts of additions can enter the mix, like -dev3, -rc1, SP2 etc.

很常见的是major.minor.fix,但即使这样也可以导致4个数字(即Firefox 2.0.0.16)。有些人有一个模型,奇数表示开发人员版本甚至数字稳定版本。所有类型的添加都可以进入混合,如-dev3,-rc1,SP2等。

Exists reasons to prefer one scheme over another and should different type of projects (i.e. Open Source vs. Closed Source) have different version naming schemes?

存在理由偏好一种方案而不是另一种方案,并且不同类型的项目(即开源与封闭源)是否有不同的版本命名方案?

12 个解决方案

#1


25  

There are two good answers for this (plus a lot of personal preferences, see gizmo's comment on religious wars)

这有两个很好的答案(加上很多个人偏好,请参阅Gizmo对宗教战争的评论)

For public applications, the standard Major.Minor.Revision.Build works best IMO - public users can easily tell what version of the program they have, and to some degree, how far out of date their version is.

对于公共应用程序,标准的Major.Minor.Revision.Build运行最佳IMO - 公共用户可以轻松地告诉他们有什么版本的程序,并且在某种程度上,他们的版本已经过时了。

For in house applications, where the users never asked for the application, the deployment is handled by IT, and users will be calling the help desk, I found the Year.Month.Day.Build to work better in a lot of situations. This version number can thus be decoded to provide more useful information to the help desk then the public versioning number scheme.

对于内部应用程序,用户从未要求应用程序,部署由IT处理,用户将调用帮助台,我发现Year.Month.Day.Build在很多情况下都能更好地工作。因此,可以对该版本号进行解码,以向帮助台提供更有用的信息,然后提供公共版本号方案。

However at the end of the day I would make one recomendation above all else - use a system you can keep consistent. If there is a system that you can setup/script your compiler to automatically use everytime, use that.

然而,在一天结束时,我会提出一个最重要的推荐 - 使用一个你可以保持一致的系统。如果有一个系统可以设置/编写您的编译器以便每次自动使用,请使用它。

The worst thing that can happen is you releasing binaries with the same version number as the previous ones - I've recently been dealing with automated network error reports (someone elses application), and came to the conclusion that the Year.Month.Day.Build version numbers shown in the core dumps where not even remotely up to date with the application itself (the application itself used a splash screen with the real numbers - which of course where not drawn from the binary as one might assume). The result is I have no way of knowing if crash dumps are coming from a 2 year old binary (what the version number indicates) or a 2 month old binary, and thus no way of getting the right source code (no source control either!)

可能发生的最糟糕的事情是你发布的二进制文件具有与之前相同的版本号 - 我最近一直在处理自动化网络错误报告(某些人的应用程序),并得出了Year.Month.Day的结论。构建核心转储中显示的版本号,其中甚至与应用程序本身甚至不是最新的(应用程序本身使用带有实数的闪屏 - 当然,这不是从二进制中提取的,如人们可能假设的那样)。结果是我无法知道崩溃转储是来自2年前的二进制文件(版本号表示的是什么)还是2个月大的二进制文件,因此无法获得正确的源代码(也没有源代码控制! )

#2


24  

Here's what we use in our company: Major.Minor.Patch version.Build Number .

以下是我们在公司中使用的内容:Major.Minor.Patch version.Build Number。

The Major change involves a full release cycle, including marketing involvement etc. This number is controled by forces outside of R&D (for example, in one of the places I worked, Marketing decided that our next version would be '11' - to match a competitor. We were at version 2 at the time :)).

主要变化涉及完整的发布周期,包括营销参与等。这个数字由研发之外的力量控制(例如,在我工作的一个地方,市场营销决定我们的下一个版本将是'11' - 以匹配竞争对手。我们当时的版本2 :))。

Minor is changed when a new feature or a major behavior change is added to the product.

将新功能或主要行为更改添加到产品时,会更改次要。

Patch version goes up by one every time a patch is officially added to the version, usually including bug fixes only.

每次将补丁正式添加到版本时,补丁版本会增加一个,通常只包括错误修复。

Build Version is used when a special version is released for a customer, usually with a bug fix specific to him. Usually that fix will be rolled up for the next patch or minor version (and Product Management usually marks the bug as "will be released for patch 3" in our tracking system).

在为客户发布特殊版本时使用构建版本,通常具有特定于他的错误修复。通常该修补程序将汇总到下一个补丁或次要版本(产品管理通常会将错误标记为“将在我们的跟踪系统中发布补丁3”)。

#3


20  

Our R&D department uses 1.0.0.0.0.000: MAJOR.minor.patch.audience.critical_situation.build

我们的研发部门使用1.0.0.0.0.000:MAJOR.minor.patch.audience.critical_situation.build

Please, please, don't do that.

请,请不要这样做。

#4


19  

I'm a big fan of Semantic versioning

我是语义版本的忠实粉丝

As many others have commented this uses the X.Y.Z format and gives good reasons as to why.

正如许多其他人所评论的那样,它使用了X.Y.Z格式并给出了原因。

#5


15  

This kind of question is more about religion war than objective aspects. There is always tons of pros and cons against a numbering scheme or another. All what people could (or should) give you is the scheme they used and why they choose it.

这种问题更多的是宗教战争而不是客观方面。对编号方案或其他方案总是有很多利弊。所有人可以(或应该)给你的是他们使用的方案以及他们选择它的原因。

On my side, I use a X.Y.Z scheme all are numbers where:

在我这边,我使用X.Y.Z方案都是数字,其中:

  • X indicate a change in the public API that introduce backward incompatibility
  • X表示引入向后不兼容性的公共API中的更改

  • Y indicate an addition of some features
  • Y表示添加了一些功能

  • Z indicate a fix (either fixing a bug, either changing internal structure without impacting functionnality)
  • Z表示修复(修复错误,更改内部结构而不影响功能)

Eventually, I use "Beta N" suffix if I want some feedback from the users before an official release is done. No "RC" suffix as nobody is perfect and there will always be bugs ;-)

最后,如果我想在正式发布之前得到用户的一些反馈,我会使用“Beta N”后缀。没有“RC”后缀,因为没有人是完美的,总会有错误;-)

#6


5  

I personally prefer MAJOR.MINOR.BUGFIX-SUFFIX where SUFFIX is dev for development versions (version control checkouts), rc1 / rc2 for release candidates and no suffix for release versions.

我个人更喜欢MAJOR.MINOR.BUGFIX-SUFFIX,其中SUFFIX用于开发版本(版本控制检出),rc1 / rc2用于发布候选版本,没有后缀用于发行版本。

If you have suffixes for development checkouts, maybe even with the revision number, there is no need to make them even/odd to keep them apart.

如果您有开发结帐的后缀,甚至可能使用修订号,则无需使它们均匀/奇怪以使它们分开。

#7


5  

We prefer major.minor.milestone.revision-build scheme, where:

我们更喜欢major.minor.milestone.revision-build方案,其中:

  • major: Increments upon significant architectural changes or important advancements in capabilities.
  • 专业:重大架构变更或功能重大进步的增量。

  • minor: Small changes and new features that does not require architectural changes.
  • minor:小的更改和新功能,不需要进行体系结构更改。

  • milestone: Indicates stability and maturity of the code:
    • 0 for development/pre-alpha
    • 0表示开发/ pre-alpha

    • 1 for alpha
    • 1代表alpha

    • 2 for beta
    • 2为测试版

    • 3 for release candidate (RC)
    • 3候选发布候选人(RC)

    • 4 for final/production release
    • 4用于最终/生产发布

  • 里程碑:表示代码的稳定性和成熟度:0表示开发/ pre-alpha 1表示alpha 2表示beta 3表示发布候选(RC)4表示最终/生产发布

  • revision: Indicates release, patch or bugfix number.
  • revision:表示版本,补丁或错误修正号。

  • build: Unique references to specific builds, or versions, of an application. Build number is a sequential integer, typically incremented at each build.
  • build:对应用程序的特定构建或版本的唯一引用。构建号是一个连续的整数,通常在每次构建时递增。

Examples:

  • 1.4.2.0-798: First beta release of version 1.4, created by build number 798.
  • 1.4.2.0-798:版本1.4的第一个beta版本,由内部版本号798创建。

  • 1.8.3.4-970: 1.8-RC4, created by build number 970.
  • 1.8.3.4-970:1.8-RC4,由内部版本号970创建。

  • 1.9.4.0-986: First production release of version 1.9, created by build number 986.
  • 1.9.4.0-986:版本1.9的第一个生产版本,由内部版本号986创建。

  • 1.9.4.2-990: Second bugfix release of version 1.9, created by build number 990.
  • 1.9.4.2-990:版本1.9的第二个错误修正版本,由内部版本号990创建。

Since prodcution releases always have 4 in their 3rd digit of version string, the digit may be removed for production releases.

由于生产版本的版本字符串的第3位数字始终为4,因此可以删除生产版本中的数字。

#8


4  

In the case of a library, the version number tells you about the level of compatibility between two releases, and thus how difficult an upgrade will be.

对于库,版本号会告诉您两个版本之间的兼容性级别,以及升级的难度。

A bug fix release needs to preserve binary, source, and serialization compatibility.

错误修复版本需要保留二进制,源和序列化兼容性。

Minor releases mean different things to different projects, but usually they don't need to preserve source compatibility.

次要版本对不同的项目意味着不同的东西,但通常他们不需要保持源兼容性。

Major version numbers can break all three forms.

主要版本号可以打破所有三种形式。

I wrote more about the rationale here.

我在这里写了更多关于理由的文章。

#9


3  

With Agile software development practices and SaaS applications, the idea of a Major vs. a Minor release has gone away - releases come out extremely frequently on a regular basis - so a release numbering scheme that relies on this distinction is no longer useful to me.

使用敏捷软件开发实践和SaaS应用程序,主要版本与次要版本的想法已经消失 - 版本经常会定期发布 - 因此依赖于此区别的版本编号方案对我来说不再有用。

My company uses a numbering scheme that takes the last 2 digits of the year the release started followed by the release number within that year.

我的公司使用编号方案,该方案采用发布开始的年份的最后2位数字,然后是该年份内的版本号。

So, the 4th release started in 2012 would be 12.4.

因此,2012年开始的第4次发布将是12.4。

You can include a "bug fix" version number after that if necessary, but ideally you are releasing frequently enough that these are not often necessary - so "12.4.2".

如果有必要,您可以在此之后添加“错误修复”版本号,但理想情况下,您经常发布这些通常不必要的版本号 - 所以“12.4.2”。

This is a very simple scheme and has not given us any of the problems of other release numbering schemes that I have used before.

这是一个非常简单的方案,并没有向我们提供我之前使用过的其他版本编号方案的任何问题。

#10


1  

The difference between a close and open-source version number policy can also come from a commercial aspect, when the major version can reflect the year of the release for instance.

close和开源版本号策略之间的区别也可以来自商业方面,例如主要版本可以反映发布的年份。

#11


1  

What we used to do here is major.minor.platform.fix.

我们以前做的是major.minor.platform.fix。

major: We increase this number when saved file from this build are no longer compatible with previous build.
Exemple: Files saved in version 3.0.0.0 won't be compatible with version 2.5.0.0.

major:当此构建中保存的文件不再与以前的构建兼容时,我们会增加此数字。示例:版本3.0.0.0中保存的文件与版本2.5.0.0不兼容。

minor: We increase this number when a new feature has been added. This feature should be seen by the user. Not a hidden feature for developper. This number is reset to 0 when major is incremented.

minor:我们在添加新功能时增加此数字。用户应该看到此功能。不是开发人员的隐藏功能。当major增加时,此数字重置为0。

platform: This is the platform we use for developpement.
Exemple: 1 stands for .net framework version 3.5.

平台:这是我们用于开发的平台。例子:1代表.net框架版本3.5。

fix : We increase this number when only bug fixes are included with this new version. This number is reset to 0 when major or minor is incremented.

修复:当此新版本中仅包含错误修复时,我们会增加此数字。当主要或次要增加时,此数字重置为0。

#12


1  

Simply

Major.Minor.Revision.Build

#1


25  

There are two good answers for this (plus a lot of personal preferences, see gizmo's comment on religious wars)

这有两个很好的答案(加上很多个人偏好,请参阅Gizmo对宗教战争的评论)

For public applications, the standard Major.Minor.Revision.Build works best IMO - public users can easily tell what version of the program they have, and to some degree, how far out of date their version is.

对于公共应用程序,标准的Major.Minor.Revision.Build运行最佳IMO - 公共用户可以轻松地告诉他们有什么版本的程序,并且在某种程度上,他们的版本已经过时了。

For in house applications, where the users never asked for the application, the deployment is handled by IT, and users will be calling the help desk, I found the Year.Month.Day.Build to work better in a lot of situations. This version number can thus be decoded to provide more useful information to the help desk then the public versioning number scheme.

对于内部应用程序,用户从未要求应用程序,部署由IT处理,用户将调用帮助台,我发现Year.Month.Day.Build在很多情况下都能更好地工作。因此,可以对该版本号进行解码,以向帮助台提供更有用的信息,然后提供公共版本号方案。

However at the end of the day I would make one recomendation above all else - use a system you can keep consistent. If there is a system that you can setup/script your compiler to automatically use everytime, use that.

然而,在一天结束时,我会提出一个最重要的推荐 - 使用一个你可以保持一致的系统。如果有一个系统可以设置/编写您的编译器以便每次自动使用,请使用它。

The worst thing that can happen is you releasing binaries with the same version number as the previous ones - I've recently been dealing with automated network error reports (someone elses application), and came to the conclusion that the Year.Month.Day.Build version numbers shown in the core dumps where not even remotely up to date with the application itself (the application itself used a splash screen with the real numbers - which of course where not drawn from the binary as one might assume). The result is I have no way of knowing if crash dumps are coming from a 2 year old binary (what the version number indicates) or a 2 month old binary, and thus no way of getting the right source code (no source control either!)

可能发生的最糟糕的事情是你发布的二进制文件具有与之前相同的版本号 - 我最近一直在处理自动化网络错误报告(某些人的应用程序),并得出了Year.Month.Day的结论。构建核心转储中显示的版本号,其中甚至与应用程序本身甚至不是最新的(应用程序本身使用带有实数的闪屏 - 当然,这不是从二进制中提取的,如人们可能假设的那样)。结果是我无法知道崩溃转储是来自2年前的二进制文件(版本号表示的是什么)还是2个月大的二进制文件,因此无法获得正确的源代码(也没有源代码控制! )

#2


24  

Here's what we use in our company: Major.Minor.Patch version.Build Number .

以下是我们在公司中使用的内容:Major.Minor.Patch version.Build Number。

The Major change involves a full release cycle, including marketing involvement etc. This number is controled by forces outside of R&D (for example, in one of the places I worked, Marketing decided that our next version would be '11' - to match a competitor. We were at version 2 at the time :)).

主要变化涉及完整的发布周期,包括营销参与等。这个数字由研发之外的力量控制(例如,在我工作的一个地方,市场营销决定我们的下一个版本将是'11' - 以匹配竞争对手。我们当时的版本2 :))。

Minor is changed when a new feature or a major behavior change is added to the product.

将新功能或主要行为更改添加到产品时,会更改次要。

Patch version goes up by one every time a patch is officially added to the version, usually including bug fixes only.

每次将补丁正式添加到版本时,补丁版本会增加一个,通常只包括错误修复。

Build Version is used when a special version is released for a customer, usually with a bug fix specific to him. Usually that fix will be rolled up for the next patch or minor version (and Product Management usually marks the bug as "will be released for patch 3" in our tracking system).

在为客户发布特殊版本时使用构建版本,通常具有特定于他的错误修复。通常该修补程序将汇总到下一个补丁或次要版本(产品管理通常会将错误标记为“将在我们的跟踪系统中发布补丁3”)。

#3


20  

Our R&D department uses 1.0.0.0.0.000: MAJOR.minor.patch.audience.critical_situation.build

我们的研发部门使用1.0.0.0.0.000:MAJOR.minor.patch.audience.critical_situation.build

Please, please, don't do that.

请,请不要这样做。

#4


19  

I'm a big fan of Semantic versioning

我是语义版本的忠实粉丝

As many others have commented this uses the X.Y.Z format and gives good reasons as to why.

正如许多其他人所评论的那样,它使用了X.Y.Z格式并给出了原因。

#5


15  

This kind of question is more about religion war than objective aspects. There is always tons of pros and cons against a numbering scheme or another. All what people could (or should) give you is the scheme they used and why they choose it.

这种问题更多的是宗教战争而不是客观方面。对编号方案或其他方案总是有很多利弊。所有人可以(或应该)给你的是他们使用的方案以及他们选择它的原因。

On my side, I use a X.Y.Z scheme all are numbers where:

在我这边,我使用X.Y.Z方案都是数字,其中:

  • X indicate a change in the public API that introduce backward incompatibility
  • X表示引入向后不兼容性的公共API中的更改

  • Y indicate an addition of some features
  • Y表示添加了一些功能

  • Z indicate a fix (either fixing a bug, either changing internal structure without impacting functionnality)
  • Z表示修复(修复错误,更改内部结构而不影响功能)

Eventually, I use "Beta N" suffix if I want some feedback from the users before an official release is done. No "RC" suffix as nobody is perfect and there will always be bugs ;-)

最后,如果我想在正式发布之前得到用户的一些反馈,我会使用“Beta N”后缀。没有“RC”后缀,因为没有人是完美的,总会有错误;-)

#6


5  

I personally prefer MAJOR.MINOR.BUGFIX-SUFFIX where SUFFIX is dev for development versions (version control checkouts), rc1 / rc2 for release candidates and no suffix for release versions.

我个人更喜欢MAJOR.MINOR.BUGFIX-SUFFIX,其中SUFFIX用于开发版本(版本控制检出),rc1 / rc2用于发布候选版本,没有后缀用于发行版本。

If you have suffixes for development checkouts, maybe even with the revision number, there is no need to make them even/odd to keep them apart.

如果您有开发结帐的后缀,甚至可能使用修订号,则无需使它们均匀/奇怪以使它们分开。

#7


5  

We prefer major.minor.milestone.revision-build scheme, where:

我们更喜欢major.minor.milestone.revision-build方案,其中:

  • major: Increments upon significant architectural changes or important advancements in capabilities.
  • 专业:重大架构变更或功能重大进步的增量。

  • minor: Small changes and new features that does not require architectural changes.
  • minor:小的更改和新功能,不需要进行体系结构更改。

  • milestone: Indicates stability and maturity of the code:
    • 0 for development/pre-alpha
    • 0表示开发/ pre-alpha

    • 1 for alpha
    • 1代表alpha

    • 2 for beta
    • 2为测试版

    • 3 for release candidate (RC)
    • 3候选发布候选人(RC)

    • 4 for final/production release
    • 4用于最终/生产发布

  • 里程碑:表示代码的稳定性和成熟度:0表示开发/ pre-alpha 1表示alpha 2表示beta 3表示发布候选(RC)4表示最终/生产发布

  • revision: Indicates release, patch or bugfix number.
  • revision:表示版本,补丁或错误修正号。

  • build: Unique references to specific builds, or versions, of an application. Build number is a sequential integer, typically incremented at each build.
  • build:对应用程序的特定构建或版本的唯一引用。构建号是一个连续的整数,通常在每次构建时递增。

Examples:

  • 1.4.2.0-798: First beta release of version 1.4, created by build number 798.
  • 1.4.2.0-798:版本1.4的第一个beta版本,由内部版本号798创建。

  • 1.8.3.4-970: 1.8-RC4, created by build number 970.
  • 1.8.3.4-970:1.8-RC4,由内部版本号970创建。

  • 1.9.4.0-986: First production release of version 1.9, created by build number 986.
  • 1.9.4.0-986:版本1.9的第一个生产版本,由内部版本号986创建。

  • 1.9.4.2-990: Second bugfix release of version 1.9, created by build number 990.
  • 1.9.4.2-990:版本1.9的第二个错误修正版本,由内部版本号990创建。

Since prodcution releases always have 4 in their 3rd digit of version string, the digit may be removed for production releases.

由于生产版本的版本字符串的第3位数字始终为4,因此可以删除生产版本中的数字。

#8


4  

In the case of a library, the version number tells you about the level of compatibility between two releases, and thus how difficult an upgrade will be.

对于库,版本号会告诉您两个版本之间的兼容性级别,以及升级的难度。

A bug fix release needs to preserve binary, source, and serialization compatibility.

错误修复版本需要保留二进制,源和序列化兼容性。

Minor releases mean different things to different projects, but usually they don't need to preserve source compatibility.

次要版本对不同的项目意味着不同的东西,但通常他们不需要保持源兼容性。

Major version numbers can break all three forms.

主要版本号可以打破所有三种形式。

I wrote more about the rationale here.

我在这里写了更多关于理由的文章。

#9


3  

With Agile software development practices and SaaS applications, the idea of a Major vs. a Minor release has gone away - releases come out extremely frequently on a regular basis - so a release numbering scheme that relies on this distinction is no longer useful to me.

使用敏捷软件开发实践和SaaS应用程序,主要版本与次要版本的想法已经消失 - 版本经常会定期发布 - 因此依赖于此区别的版本编号方案对我来说不再有用。

My company uses a numbering scheme that takes the last 2 digits of the year the release started followed by the release number within that year.

我的公司使用编号方案,该方案采用发布开始的年份的最后2位数字,然后是该年份内的版本号。

So, the 4th release started in 2012 would be 12.4.

因此,2012年开始的第4次发布将是12.4。

You can include a "bug fix" version number after that if necessary, but ideally you are releasing frequently enough that these are not often necessary - so "12.4.2".

如果有必要,您可以在此之后添加“错误修复”版本号,但理想情况下,您经常发布这些通常不必要的版本号 - 所以“12.4.2”。

This is a very simple scheme and has not given us any of the problems of other release numbering schemes that I have used before.

这是一个非常简单的方案,并没有向我们提供我之前使用过的其他版本编号方案的任何问题。

#10


1  

The difference between a close and open-source version number policy can also come from a commercial aspect, when the major version can reflect the year of the release for instance.

close和开源版本号策略之间的区别也可以来自商业方面,例如主要版本可以反映发布的年份。

#11


1  

What we used to do here is major.minor.platform.fix.

我们以前做的是major.minor.platform.fix。

major: We increase this number when saved file from this build are no longer compatible with previous build.
Exemple: Files saved in version 3.0.0.0 won't be compatible with version 2.5.0.0.

major:当此构建中保存的文件不再与以前的构建兼容时,我们会增加此数字。示例:版本3.0.0.0中保存的文件与版本2.5.0.0不兼容。

minor: We increase this number when a new feature has been added. This feature should be seen by the user. Not a hidden feature for developper. This number is reset to 0 when major is incremented.

minor:我们在添加新功能时增加此数字。用户应该看到此功能。不是开发人员的隐藏功能。当major增加时,此数字重置为0。

platform: This is the platform we use for developpement.
Exemple: 1 stands for .net framework version 3.5.

平台:这是我们用于开发的平台。例子:1代表.net框架版本3.5。

fix : We increase this number when only bug fixes are included with this new version. This number is reset to 0 when major or minor is incremented.

修复:当此新版本中仅包含错误修复时,我们会增加此数字。当主要或次要增加时,此数字重置为0。

#12


1  

Simply

Major.Minor.Revision.Build