Steve, 

You might want to look into XMLPreprocess
(http://sourceforge.net/projects/xmlpreprocess/). I use it to replace
environment specific settings in .NET config files in my build process.


Let me know if you'd like some examples. 

Regards, 

Craig Ducharme
Direct Alliance Corporation 
Configuration Management Specialist
480.446.1653 Direct
602.709.0613 Pager
[EMAIL PROTECTED] 
www.direct-alliance.com 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:nant-users-
> [EMAIL PROTECTED] On Behalf Of Steve Baker
> Sent: Friday, July 29, 2005 9:57 AM
> To: Gary Feldman; [email protected]
> Subject: RE: FW: [Nant-users] regex replace
> 
> I have a web site that is pulled down from vss. The nant script zips
the
> web site up and deploys it to staging automatically.
> 
> Before I zip the files, I need to modify a file that has config
settings
> in it. It logically is the same file, with staging settings instead of
> developer settings. I can't rename the file or move it because the web
> site depends on it being there and named the same for both
environments,
> just with different settings.
> 
> I have options, I can convince the client to use my compiled
> regex-replace task, I can use a scripted version of it, I can try the
> replacestring filter with in an in place copy, or do the extra work of
a
> replacestring with a new file name and another file move if the in
place
> copy doesn't work for some reason.
> 
> It just seems to me like it would make sense to have this kind of
> functionality at least in nant contrib. it is a very common task and
one
> that doesn't seem well supported by the nant or contrib libraries.
> 
> steve
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Gary
> Feldman
> Sent: Friday, July 29, 2005 11:23 AM
> To: [email protected]
> Subject: Re: FW: [Nant-users] regex replace
> 
> Steve Baker wrote:
> 
> >So I had never seen the replacestring filter before, that is cool...
> >
> >Any one know what happens if I use the copy task like this <copy
> >file="changeme.txt" tofile="changeme.txt" /> cause I really don't
want
> >another file laying around :(
> >
> >
> You'll risk messing up things that depend upon file modification times
-
> 
> which includes source control systems and (I believe) NAnt's copy
task.
> 
> That doesn't mean it won't work, but you may discover problems in the
> future that will be difficult to diagnose.
> 
> Disk space is cheap.  The general rule is that files that represent
> different things should have different file names.  In this case, the
> two files represent two different things - one before the replacement,
> one after.  A common approach to this is to have the first named
> "changeme.txt.in" and the second "changeme.txt."
> 
> Gary
> 
> 
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September
> 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
&
> QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Nant-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September
> 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
& QA
> Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
> _______________________________________________
> Nant-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nant-users


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to