The NAntContrib version task will increment the version number and return the new one in a property. You don't have to provide it the current version, it persists that to disk. You then use the asminfo task to create a new AssemblyInfo file. asminfo is a task in NAnt core.
A couple months ago I sent in a revision to the version task, which added the ability to return the current build number only. I'm not sure if it has been checked in, as I'm not a developer on the project and haven't looked at the latest nightly build in a while.
----Original Message Follows----
From: "Bonnett, Evan A" <[EMAIL PROTECTED]>
To: "'Gert Driesen'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: [Nant-users] Labeling and Versioning
Date: Thu, 1 Apr 2004 10:45:33 -0500
Gert,
How do you handle getting the current version of the AssemblyInfo file for
the purpose of incrementing and creating a new AssemblyInfo file?
Or do you have the version entered on the command line every time?
Thanks,
Evan A. Bonnett
Reynolds and Reynolds, IT
ERA Integrated Desking Development
937-485-8577
58577
-----Original Message-----
From: Gert Driesen [mailto:[EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:19 AM
To: Bonnett, Evan A
Subject: Re: [Nant-users] Getting Code from VSS via NAnt
I was just asking what exactly the ${versioning.prog}does ? Does it
create/update an AssemblyInfo.cs ?
You could use the <asminfo> task to create the AssemblyInfo.cs file, see
http://nant.sourceforge.net/nightly/help/tasks/asminfo.html
<http://nant.sourceforge.net/nightly/help/tasks/asminfo.html> for more
information.
Gert
----- Original Message -----
From: Bonnett, Evan A <mailto:[EMAIL PROTECTED]>
To: 'Gert Driesen' <mailto:[EMAIL PROTECTED]>
Sent: Monday, March 22, 2004 3:07 PM
Subject: RE: [Nant-users] Getting Code from VSS via NAnt
Well, I could do a foreach on the AssemblyInfo.cs file and find the Version
attribute. Is that what you were referring to? (sorry, the beginner in me
is coming out)
Evan A. Bonnett
Reynolds and Reynolds, IT
-----Original Message-----
From: Gert Driesen [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent: Saturday, March 20, 2004 3:21 AM
To: Bonnett, Evan A
Subject: Re: [Nant-users] Getting Code from VSS via NAnt
----- Original Message -----
From: "Bonnett, Evan A" <[EMAIL PROTECTED]>
To: "'Noel Gifford'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, March 19, 2004 2:26 PM
Subject: RE: [Nant-users] Getting Code from VSS via NAnt
> Cool, thanks. I am setting the version #'s to "" globally to start
> with. Then, I call an exe using the <exec> task. That outputs the new
> version # to a txt file. Using a <foreach>, I set the properties.
> Here is the
code.
> Let me know what you think. I am basing this off an example that Jarek
> provided. I hope I am doing things right.
>
>
> <property name="version.major" value="" />
> <property name="version.minor" value="" />
> <property name="version.revision" value="" />
> <property name="version.build" value="" />
> .
> .
> .
> <target name="label">
> <exec program="${versioning.prog}" commandline="AssemblyInfo.cs"
> output="${version.file}" />
What does this program actually do ? Can't you implement this using NAnt ?
Gert
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users