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
