We have the copy task so far, filtering would need to be added.  

I seem to remember John Lam has implemented this for his own version of NAnt but I 
haven't seen the code anywhere.  I just think where a parallel for similar 
functionality exists (in Ant) it should be used if possible, unless it just doesn't 
apply to .NET.

The extended functionality in the form of FilterChains is pretty powerful [1], and 
would probably be a worthy extension to NAnt.

I might have a crack at it in a couple of weeks when my schedule eases up a bit.

Duncan

----- Original Message ----- 
From: "Daya Sharma" <[EMAIL PROTECTED]>
To: "'Duncan Godwin'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, August 20, 2003 8:18 PM
Subject: RE: [Nant-users] Replace Task in Nant


> Do we have Ant's Copy and Filters equivalent in Nant??
> 
> -daya
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Duncan
> Godwin
> Sent: Wednesday, August 20, 2003 12:59 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Nant-users] Replace Task in Nant
> 
> 
> I would argue it's nice to have an integrated task rather than requiring
> knowledge of another external tool.
> 
> I wonder though if there should be a replace task at all, in ant, this sort
> of thing is done with copy and filters [1], and I think where it still fits
> it makes sense to reuse the power of existing idoms. [1].
> 
> Duncan
> 
> [1] http://ant.apache.org/manual/CoreTasks/filter.html
> 
> ----- Original Message -----
> From: "Anthony LoveFrancisco" <[EMAIL PROTECTED]>
> To: "'Jaroslaw Kowalski'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, August 20, 2003 1:26 AM
> Subject: RE: [Nant-users] Replace Task in Nant
> 
> 
> > Overall, I like the idea, but I'm wondering the utility/value of a set of
> > new tasks versus just invoking sed/awk/perl from an exec task ?
> >
> > - Ants
> >
> > |  -----Original Message-----
> > |  From: [EMAIL PROTECTED]
> > |  [mailto:[EMAIL PROTECTED] On Behalf Of
> > |  Jaroslaw Kowalski
> > |  Sent: Tuesday, 19 August, 2003 13:48
> > |  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > |  Subject: Re: [Nant-users] Replace Task in Nant
> > |
> > |
> > |  Great idea. It would also be useful for updating assembly
> > |  versions within daily builds. And because it's very easy to
> > |  use regular expressions on .NET I suggest that we supported
> > |  regexes in search patterns.
> > |
> > |  This way you could have:
> > |
> > |  <replace regex="^[assembly: AssemblyVersion(.*)]$"
> > |  replace="[assembly: AssemblyVersion(&quot;${project.version}&quot;)">
> > |      <files>
> > |          <includes name="**/AssemblyInfo.cs" />
> > |      </files>
> > |  </replace>
> > |
> > |  I'm also thinking about using this task to insert / ensure
> > |  standard license header (BSD, GPL) into source files, but
> > |  perhaps that should be another task.
> > |
> > |  Jarek
> > |
> > |  ----- Original Message -----
> > |  From: "Daya Sharma" <[EMAIL PROTECTED]>
> > |  To: <[EMAIL PROTECTED]>
> > |  Sent: Tuesday, August 19, 2003 7:30 PM
> > |  Subject: [Nant-users] Replace Task in Nant
> > |
> > |
> > |  > Hi All
> > |  >
> > |  > I think it will be wonderful to have a Replace task in
> > |  Nant, much like
> > |  > it
> > |  is
> > |  > in ANT http://ant.apache.org/manual/CoreTasks/replace.html .
> > |  >
> > |  > This is specially useful for cases like changing the value of the
> > |  > project URL when using Solution task. Case in point is the
> > |  following
> > |  > that I had to write to change "http://localhost/ipm/ipm.csproj";
> > |  > project URL to <build.dir>/ipm/ipm.csproj in order for my
> > |  .csproj to
> > |  > compile using NANT's solution task. (Pardon me for a pathetic
> > |  > algorithm of deleting and recreating the ipm.sln file.)
> > |  >
> > |  > public static void ScriptMain(Project project)
> > |  > {
> > |  > FileInfo fileInfo = new FileInfo(project.BaseDirectory +
> > |  "\\ipm.sln");
> > |  > FileStream file = File.Open(fileInfo.ToString(), FileMode.Open,
> > |  > FileAccess.ReadWrite); StreamReader reader = new
> > |  StreamReader(file);
> > |  > string line = null;
> > |  > line = reader.ReadToEnd();
> > |  > if(line.IndexOf("http://localhost/ipm";) != -1)
> > |  > {
> > |  > //Console.WriteLine(line);
> > |  > StringBuilder sb = new StringBuilder(line);
> > |  > sb.Replace("http://localhost/ipm/";, project.BaseDirectory+"\\");
> > |  > line = sb.ToString();
> > |  > reader.Close();
> > |  > fileInfo.Delete();
> > |  > Console.WriteLine(line); // output the changed file
> > |  contents just for
> > |  > verbosity
> > |  > file = File.Open(project.BaseDirectory+"\\ipm.sln",
> > |  FileMode.CreateNew,
> > |  > FileAccess.Write);
> > |  > StreamWriter writer = new StreamWriter(file);
> > |  > writer.AutoFlush = true;
> > |  > writer.WriteLine(line);
> > |  > }
> > |  > file.Close();
> > |  > }
> > |  >
> > |  > Please provide me with your input.
> > |  >
> > |  > Thanks in advance.
> > |  >
> > |  > -daya
> > |  >
> > |  >
> > |  >
> > |  > -------------------------------------------------------
> > |  > This SF.net email is sponsored by Dice.com.
> > |  > Did you know that Dice has over 25,000 tech jobs available
> > |  today? From
> > |  > careers in IT to Engineering to Tech Sales, Dice has tech
> > |  jobs from
> > |  > the best hiring companies.
> > |  http://www.dice.com/index.epl?rel_code=104
> > |  >
> > |  _______________________________________________
> > |  > Nant-users mailing list
> > |  > [EMAIL PROTECTED]
> > |  > https://lists.sourceforge.net/lists/listinfo/nant-users
> > |  >
> > |
> > |
> > |
> > |  -------------------------------------------------------
> > |  This SF.net email is sponsored by Dice.com.
> > |  Did you know that Dice has over 25,000 tech jobs available
> > |  today? From careers in IT to Engineering to Tech Sales, Dice
> > |  has tech jobs from the best hiring companies.
> > |  http://www.dice.com/index.epl?rel_code=104
> > |
> > |  _______________________________________________
> > |  Nant-users mailing list
> > |  [EMAIL PROTECTED]
> > |  https://lists.sourceforge.net/lists/listinfo/|  nant-users
> > |
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by Dice.com.
> > Did you know that Dice has over 25,000 tech jobs available today? From
> > careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
> > best hiring companies. http://www.dice.com/index.epl?rel_code=104
> > _______________________________________________
> > Nant-users mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/nant-users
> >
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by Dice.com.
> Did you know that Dice has over 25,000 tech jobs available today? From
> careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
> best hiring companies. http://www.dice.com/index.epl?rel_code4
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by Dice.com.
> Did you know that Dice has over 25,000 tech jobs available today? From
> careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
> best hiring companies. http://www.dice.com/index.epl?rel_code=104
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>



-------------------------------------------------------
This SF.net email is sponsored by Dice.com.
Did you know that Dice has over 25,000 tech jobs available today? From
careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
best hiring companies. http://www.dice.com/index.epl?rel_code4
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to