kala-tamin Versioning Build numbers with TortoiseSVN


Versioning Build numbers with TortoiseSVN



Multiple duplicates: http://stackoverflow.com/search?q=svnversion


I'm using TortoiseSVN with SVN Service running as a service on a windows server.

I would like the version / build number in the project to be updated as or after the project is committed. So that the correct version / build on the project will be reflected in several places such as log files, Resource tables, Help > About Etc...

Thanks...




IS it possible to open a *.sln file created using Microsoft Visual Studio 2008 in MS VS 2005?

1:



can i install and run visual studio 2008 on vista ultimate 32 bit?
You can do this in the build script and other places right before you make EXEs, install files, etc - .
Good UML designer for Visual Studio 2008 Professional Edition with code generation
What I did to add it to my resources/version info was make a template file for my rc file, use the macro substitution, then add a call to SubWCRev in the prebuild step of my EXE's project.


Visual Studio 2008 macro question
.
Deploy doesn't copy app_data's subfolders
See this.
Register VS2008 Professional on Windows 7
SubWCRev is a tool you can use for this.


Is there a clean approach to justify text in Reporting Service?
.
VS2008.NET: Getting a referenced project's dependencies to copy to main project's bin folder
$WCREV$ is the macro that gets replaced with the current svn revision.. Each template file is in the SVN repository but the actual files that get compiled/interpreted are generated from those.

So just prior to building each generated output (exe, installer, release notes, etc) you would run the subwcrev tool and replace the macros..


2:


You can use Revision tag.. Select one file which will contain some variable/constant with revision number.

Add svn:keywords SVN property with Revision value to this file (RMB on file, TortoiseSVN->Properties->New, "svn:keywords" as name, "Revision" as value).

Now inside this file every occurrence of "$Revision$" tag will be replaced with "$Revision: 7 $" for instance.

Unfortunately this would be the version of this file only, so it'd have to be "touched" every time build number increases.. You can find more keywords working this way in SVN Book.


3:


Integrate something into your build process which writes the current SVN revision into a source file (e.g.

revision.h which only contains a "const int revision = xxx;") which is not under version control (svn:ignore) and include this in the build.. Here's a very simple snippet to get the idea:.
echo "const int revision = `svn info | grep Revision | cut -d":" -f 2`;" > revision.h 



93 out of 100 based on 83 user ratings 933 reviews