Getting software version numbers right. v1.0.0.1 [

2020-05-15 16:23发布

I distribute software online, and always wonder if there is a proper way to better define version numbers.

Let's assume A.B.C.D in the answers. When do you increase each of the components?

Do you use any other version number tricks such as D mod 2 == 1 means it is an in house release only?

Do you have beta releases with their own version numbers, or do you have beta releases per version number?

16条回答
太酷不给撩
2楼-- · 2020-05-15 16:32

For in-house development, we use the following format.

[Program #] . [Year] . [Month] . [Release # of this app within the month]

For example, if I'm releasing application # 15 today, and it's the third update this month, then my version # will be

15.2008.9.3

It's totally non-standard, but it is useful for us.

查看更多
We Are One
3楼-- · 2020-05-15 16:33

Our policy:

  • A - Significant (> 25%) changes or additions in functionality or interface.
  • B - small changes or additions in functionality or interface.
  • C - minor changes that break the interface.
  • D - fixes to a build that do not change the interface.
查看更多
We Are One
4楼-- · 2020-05-15 16:36

In my opinion, almost any release number scheme can be made to work more or less sanely. The system I work on uses version numbers such as 11.50.UC3, where the U indicates 32-bit Unix, and the C3 is a minor revision (fix pack) number; other letters are used for other platform types. (I'd not recommend this scheme, but it works.)

There are a few golden rules which have not so far been stated, but which are implicit in what people have discussed.

  • Do not release the same version twice - once version 1.0.0 is released to anyone, it can never be re-released.
  • Release numbers should increase monotonically. That is, the code in version 1.0.1 or 1.1.0 or 2.0.0 should always be later than version 1.0.0, 1.0.9, or 1.4.3 (respectively).

Now, in practice, people do have to release fixes for older versions while newer versions are available -- see GCC, for example:

  • GCC 3.4.6 was released after 4.0.0, 4.1.0 (and AFAICR 4.2.0), but it continues the functionality of GCC 3.4.x rather than adding the extra features added to GCC 4.x.

So, you have to build your version numbering scheme carefully.

One other point which I firmly believe in:

  • The release version number is unrelated to the CM (VCS) system version numbering, except for trivial programs. Any serious piece of software with more than one main source file will have a version number unrelated to the version of any single file.

With SVN, you could use the SVN version number - but probably wouldn't as it changes too unpredictably.

For the stuff I work with, the version number is a purely political decision.

Incidentally, I know of software that went through releases from version 1.00 through 9.53, but that then changed to 2.80. That was a gross mistake - dictated by marketing. Granted, version 4.x of the software is/was obsolete, so it didn't immediately make for confusion, but version 5.x of the software is still in use and sold, and the revisions have already reached 3.50. I'm very worried about what my code that has to work with both the 5.x (old style) and 5.x (new style) is going to do when the inevitable conflict occurs. I guess I have to hope that they will dilly-dally on changing to 5.x until the old 5.x really is dead -- but I'm not optimistic. I also use an artificial version number, such as 9.60, to represent the 3.50 code, so that I can do sane if VERSION > 900 testing, rather than having to do: if (VERSION >= 900 || (VERSION >= 280 && VERSION < 400), where I represent version 9.00 by 900. And then there's the significant change introduced in version 3.00.xC3 -- my scheme fails to detect changes at the minor release level...grumble...grumble...

NB: Eric Raymond provides Software Release Practice HOWTO including the (linked) section on naming (numbering) releases.

查看更多
一夜七次
5楼-- · 2020-05-15 16:40

I usually use D as a build counter (automatic increment by compiler) I increment C every time a build is released to "public" (not every build is released) A and B are used as major/minor version number and changed manually.

查看更多
对你真心纯属浪费
6楼-- · 2020-05-15 16:41

For the past six major versions, we've used M.0.m.b where M is the major version, m is the minor version, and b is the build number. So released versions included 6.0.2, 7.0.1, ..., up to 11.0.0. Don't ask why the second number is always 0; I've asked a number of times and nobody really knows. We haven't had a non-zero there since 5.5 was released in 1996.

查看更多
相关推荐>>
7楼-- · 2020-05-15 16:44

A good user-friendly versioning scheme originated on the old Mac OS is described in this Apple technical note: http://developer.apple.com/technotes/tn/tn1132.html

查看更多
登录 后发表回答