Hi Bob,

The way that I do this is to use the <asminfo> task to generate the assemblyinfo file on the fly rather than having one in the project.  This way I can work out the version numbers into properties (I use a time stamp style version number) and set this to the AssemblyVersionAttribute.

There's also a <version> task in NAntContrib that will automatically increment a version number file and then expose it as NAnt properties -haven't used it myself, but it looks like it mught do what you want.

If you don't want to use the <asminfo> task, then the other options I can think of are:

1) Write your own task to modify the AssemblyInfo file and set the version to whatever you want.
2) Use the <script> task to create a function that does the above.
3) Use a place holder in your AssemblyInfo file and then use the <copy> task with a filter chain to replace teh place holder with the version number.

HTH,

Bill








From "ChandraSekhar Medidi" <[EMAIL PROTECTED]>@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]

15/11/2006 01:30


To
nant-users@lists.sourceforge.net
cc
Subject
[NAnt-users] How to Automate build numbering process?






Hi everyone,
 
We are using NAnt scripts to do our daily builds. right now we are giving build numbers manually through command line in increments of 1 for every successive build. How to automate the Build numbering process. everytime buildscript should automatically increment the previous build number by 1 and do the build. How to achieve this requirement?. Any suggestions are highly appreciated.
 
Thanks in advance,
Bob

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users




IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.


Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.


Avon Insurance plc (No. 209606).
Registered in England. Registered Office: Arden Street, Stratford upon Avon, Warwickshire CV37 6WA.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.


*For security and training purposes, telephone calls may be recorded and monitored.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to