< Day Day Up > |
File VersioningEvery file in a product should have a version number; a four-part number separated by periods such as the one that follows seems to be the established best practice. There are many variations of what each part represents. I will explain what I think is the best way of defining these parts. <major version>.<minor version>.<build number>.<revision>
Note These numbers range between 0 and 64K and can be enforced by a prebuild test tool or a build verification test. As a rule of thumb, each codeline in a source tree should have its own build number, and that number should start at zero when the branch is created. If it is a build off of the main trunk, the build number should go into the <revision> field. Keep your mainline incrementing with each build as long as it is still the tip of your source tree. See Chapter 16, "Managing Hotfixes and Service Packs," for detailed examples on this labeling. For example, 5.1.2600.2180 is a typical file version for a Windows XP SP2 binary. Let's break this down in more detail:
How can this revision build number (2180) be smaller than the original XP RTM build (2600)? The reason is because the SP2 codeline is a branch off the XP mainline (the 2600 codeline). When the branch was made, the build number was reset to 0. The large number of builds is a result of SP2 containing all the SP1 changes, which was the same branch. (The RTM build number was 1086 for SP1.) If this was a one-off hotfix rather than a service pack release, the <revision> field might have the number of the bug that was being fixed, such as 1000 (if this was the bug number). Again, to better visualize this, see the sample VSS tree drawings in Chapter 16.
|
< Day Day Up > |
No comments:
Post a Comment