[MonoDevelop] Best way to manage program version number for C

Steve Lessard s_lessard at yahoo.com
Tue Apr 12 17:27:43 EDT 2011


I manage incrementing the version number in my assemblies with a few simple 
shell commands that can be called from a makefile or .csproj file.

Preparation:
In your AssemblyInfo.cs file update the code that sets the assembly's version 
number by replacing the build increment number with a special token you can 
easily identify later with editing tools such as sed. (I used ${BUILD_NUMBER})

The steps are:
1. Check out of source control a file that contains nothing more than the most 
recently used build number as text
2. load the text of that file into an environment variable
3. Increment the value in that environment variable
4. Use sed to search AssemblyInfo.cs and replace the special token with the 
value of the incremented environment variable.
5. Write the value of the incremented environment variable back to the text file
6. Check the text file back into source control.
7. Run your build as usual






________________________________
From: Steve Ricketts <velocedge at hotmail.com>
To: monodevelop-list at lists.ximian.com
Sent: Mon, April 11, 2011 3:22:35 AM
Subject: Re: [MonoDevelop] Best way to manage program version number for C

Yes, it does.  But code-wise, how do you manage the revision number?  Can you
access the version number in the solution or project?  Is there a way to
automatically increment that?  

--
View this message in context: 
http://mono.1490590.n4.nabble.com/Best-way-to-manage-program-version-number-for-C-tp3440476p3441560.html

Sent from the Mono - MonoDevelop IDE mailing list archive at Nabble.com.
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20110412/2d07996a/attachment.html 


More information about the Monodevelop-list mailing list