Support for filterchains is in CVS now, so you could do something like this
:

<copy todir="...">
    <fileset>
        <include name="**/*" />
    </fileset>
   <filterchain>
        <replacetokens begintoken="@" endtoken="@">
            <token key="VERSION" value="${version}" />
        </replacetokens>
    </filterchain>
</copy>

This would replace all @VERSION@ tokens in the copied files with the value
of the "version" property.

Hope this helps,

Gert

----- Original Message ----- 
From: "michael he" <[EMAIL PROTECTED]>
To: "Gert Driesen" <[EMAIL PROTECTED]>
Cc: "Brian Yeo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 28, 2004 8:52 AM
Subject: Re: [Nant-users] How to filter back version number in .cs and .vb
files


> check out this: http://www.iunknown.com/000103.html
>
> On Wed, 30 Jun 2004 06:30:48 +0200, Gert Driesen
> <[EMAIL PROTECTED]> wrote:
> > Brian,
> >
> > You could use the <asminfo> task to generate your AssemblyInfo.cs file
from
> > scratch, or you could wait until we've integrated FilterChain support
> > (http://ant.apache.org/manual/CoreTypes/filterchain.html) into NAnt as
that
> > would allow you to replace part of a file.
> >
> > Gert
> >
> >
> >
> > ----- Original Message -----
> > From: "Brian Yeo" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, June 28, 2004 12:03 PM
> > Subject: [Nant-users] How to filter back version number in .cs and .vb
files
> >
> > > <target name="run"..>
> > >
> > > <version startDate="June 30, 2004" buildtype="noincrement"
prefix="sys."
> > > path="C:\DotNet\build.number" revisiontype="increment"/>
> > >
> > > < ??????? tofile="${drive}\${src.path.blocks}\${Data
> > > Access}\${DA}\AssemblyInfo.cs" filtered="true"/>
> > >
> > > </target>
> > >
> > > I was able to increment the version number via a text file
'build.number'
> > > containing 1.0.0.0. However, I do not know how to filter/inject it
back to
> > > the cs file?. Can anyone help?
> > >
> > > Regards,
> > > Brian Yeo
> > > registered user at sourceforge
> > >
> > > _________________________________________________________________
> > > Smart Saving with ING Direct - earn 5.25% p.a. variable rate:
> > >
> >
http://ad.au.doubleclick.net/clk;7249209;8842331;n?http://www.ingdirect.com.
> > au/burst6offer.asp?id=8
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email sponsored by Black Hat Briefings & Training.
> > > Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> > > digital self defense, top technical experts, no vendor pitches,
> > > unmatched networking opportunities. Visit www.blackhat.com
> > > _______________________________________________
> > > Nant-users mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/nant-users
> > >
> >
> > -------------------------------------------------------
> > This SF.Net email sponsored by Black Hat Briefings & Training.
> > Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> > digital self defense, top technical experts, no vendor pitches,
> > unmatched networking opportunities. Visit www.blackhat.com
> > _______________________________________________
> > Nant-users mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/nant-users
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to