[nem-en] Assembly Version from SVN

vc vc at rsdn.ru
Tue Jan 16 12:20:38 CET 2007


Hi,

> I've just implemented the simple version of our new
> AssemblyVersionFromSVN macro/attribute. What does it do?

Unfortunately the Nemerle.MSBuild.Tasks.nproj where you use this attribute
does not build. Error message:
nemerle\tools\msbuild-task\MSBuildTask.n(42,12,42,48): error : 
the custom attribute `AssemblyVersionFromSVN ("0.9.3.SVN")' 
could not be found or is invalid


> It simply
> executes the 'svn info' shell command and if it succeeds it replaces
> the "SVN" string from given assembly version string with the read
> value of svn revision, otherwise (command does not succeed it uses *)
> Note that - the command is executed in directory from which compiler
> was executed, so it might be some crazy path in IDE.. :(

It's bad way.

In svn://rsdn.ru/Janus/trunk/SvnRevision you can find simple implementation
same logic on C#. It's implementation simply scan SVN's files and retrieve
version.

> It will work only if you have  'svn' command on PATH,

It's bad approach. For example, on my PC svn.exe do not installed. I use
TortoiseSVN which use dll's for communication with SVN.

> The usage is simple:
> 
> [assembly: Nemerle.Utility.AssemblyVersionFromSVN ("1.2.3.SVN")]

I like it. 

> I applied the attribute to MSBuild task - you you are all ok with how
> it works I will boot the compiler and annotate all assemblies with new
> attribute.

No. Not oll OK. :(
Try run BuildAndReg-1-phase.cmd




More information about the devel-en mailing list