views:

1271

answers:

6

I have been struggling with versioning software for a while now. I'm not talking about a naming convention, I'm talking about how to actually apply a version in a build system all the way through to a release.

I generally use major.minor.maintenance-[release type] i.e. 1.0.2-rc1

The problem is managing the version number. I've tried many ways (sticking it in a build file, a properties file, a database, etc,etc) but I haven't found anything that really works well.

The closest thing I came up with is using Jira which I documented here: http://blog.sysbliss.com/uncategorized/release-management-with-atlassian-bamboo-and-jira.html

I'm wondering if anyone has any good ideas about this. Also, wondering how people handle releasing a version.... i.e. If I release/deploy version 1.0.0-rc1 do bugs found in this release then get logged into 1.0.0 (the next/production release).

+4  A: 

Microsoft uses <major>.<minor>.<patch>-<build number> (or a variation).

I like using <major>.<minor>.<buildnumber>

warren
A: 

We also use <major>.<minor>.<buildnumber> and we manage this with CruiseControl/(.Net) on our build server. And use Wix and CruiseControl Config to manage the Major minor numbers - still increment those by hand - but the build number happens automatically when on the build server. You could set up a rule an increment the major/minor automatically too I believe - we just have like to do that manually so that it takes concious thinking by a dev when it is time to name a particular release level.

silverbugg
A: 
Gary Rowe
A: 

+1 on the Jira/Bamboo solution. The only additional information about the build I would include (for my purposes) is the Subversion Release, although the Tagging operation is 80% of what I want.

Manually maintaining the release/version information is a royal pain. Letting JIRA drive it is a great idea.

On the final question, about where bugs/defects get logged and releasing a version:

  • Defect/Issue is logged against the release where it appears. A defect in 1.0.0-rc1 gets logged against 1.0.0-rc1
  • JIRA has (or maybe we added) a 'Fix-For' field that would have the planned release, in this case 1.0.0
  • If the defect/issue is severe enough, it may be necessary to add another 'rc' release.
  • The release is made when there are no outstanding critical defects/issues and the customer (or management) agrees that any remaining issues can be deferred

The beauty of managing this through JIRA is that adding releases, generating change-logs, etc. is automated fairly well.

Ken Gentle
+1  A: 

This is probably a dead post now, but I'll add my two cents anyways. I'm of the opinion that build numbers should mean something to everyone who sees it. So I personally think that this is a good way to name versions:

major.minor.patch.revision - e.g. 1.1.4.2342

Major/minor numbers are pretty self-explanatory. But from the perspective of the 3rd number, it still needs to mean something to the customer. I've released this new version to you, Mr. Customer, but it wasn't worth a new minor number since we just fixed some bugs. So we've incremented the patch number.

The 4th number usually means absolutely NOTHING to the customer, so you might as well make it useful to you and anyone else in your company that sees it. So for us, that number is the SVN revision number. It tells us exactly which revision was responsible for that version so that we can pull it out any any time to recreate it. Branching code obviously achieves this too, but not to 100% certainty.

Also, another advantage with an all-numeric version number is that it easily integrates into nearly every continuous build system.

Anyways, that's my two cents.

Sven Batalla
A: 

Major.Minor.BuildDateNumber.DailyBuildNumber

Major and Minor are set by us, manually incrementing them as we see fit.

BuildDateNumber is the number of months since the project start multiplied by 100, plus the day number of the current month.

DailyBuildNumber is incremented for every build after midnight each day, starting at zero.

E.g. 4th build of release 5.2 on 10 July, where the project started 1 Jan that year, would have version number

5.2.710.3

This is all calculated for us by the Version task in Nant.

This keeps the version numbers unique and also allows us to quickly calculate when an installation was built.

tomfanning