views:

1636

answers:

6

What are the strategies for versioning of a web application/ web site?

I notice that here in the Beta there is an svn revision number in the footer and thats great for an application that uses svn over one repository. But what if you use externals or a different source control application that versions separate files?

It seems easy with a Desktop app but I can't seem to find a suitable way of versioning for an asp.net web application.

NB I'm not sure that I have been totally clear with my question.

  1. What I want to know is how build and auto increment a verison number for an asp.net application.
  2. I'm not interested in how to link it with svn.
+2  A: 

For my big apps I just use a incrementing version number id (1.0, 1.1, ...) that i store in a comment of the main file (usually index.php).

For just websites I usually just have a revision number (1,2,3,...).

Unkwntech
A: 

I have a tendency to stick with basic integers at first (1,2,3), moving onto rational numbers (2.1, 3.13) when things get bigger...

Tried using fruit at one point, that works well for a small office. Oh, the 'banana' release? looks over in the corner "yea... thats getting pretty old now..."

Unfortunately confusion started to set in when the development team grew, is it an Orange, or Mandarin, or Tangelo? It looks ok... what do you mean "rotten on the inside?"

... but in all honesty. Setup a separate repository as a master, development goes on in various repositories... for every scheduled release everything is checked in to the master repository so that you can quickly roll back when something goes wrong. (I'm assuming dev/test/production are all separate servers and dev is never allowed to touch production or the master repository....)

sascha
A: 

I maintain a system of web applications with various components that live in separate SVN repos. To be able to version track the system as a whole, I have another SVN repo which contains all other repos as external references. It also contains install / setup script(s) to deploy the whole thing. With that setup, the SVN revision number of the "metarepository" could possibly be used for versioning the complete system.

In another case, I include the SVN revision via SVN keywords in a class file that serves no other purpose (to avoid the risk of keyword substitution breaking my code). The class in that file contains a string variable that is manipulated by SVN and parsed by a class method.

An inconvenience with both approaches is that the revision number is not automatically updated by changes in the externals (approach 1) or the rest of the code (approach 2).

Hanno Fietz
+1  A: 

See this related question:

How do I sync the SVN revision number with my ASP.NET web site?

Zack Peterson
A: 

During internal development, I'm using milestone numbers (M1, M2, M3...). After release, I'll probably just update dates ("the January 2009 update").

Bill Williams
+3  A: 

I think what you are looking for is something like this: How to auto-increment assembly version using a custom MSBuild task. It's a little old but I think it will work.

John Asbeck