NAnt XMLPoke on a remote config via FTP?
I'm familiar with copying files in our network but I need to FTP the files to a remote server, and also poke the config file for the proper logging settings. For a local copy I use something like:
<xmlpoke file="${PublishLocation}\web.config" xpath="/configuration/appSettings/add[@key='LogLocation']/@value" value="${LoggingLocation}" />
Great and all开发者_如何学C, but how does this work with an FTP push? Is it possible to copy the files up and then poke the values? Or do I have to set the values first (xmlpoke I assume) before I copy?
Thanks.
I see no way to specify a URL in the <xmlpoke>
task, so yeah, you'll have to modify locally and then push to the FTP location. The NAntContrib tasks don't seem to have anything that will do that either. You could try to use Serge's <xmllist>
custom task and modify it by adapting it to use FtpWebRequest and piggyback the XML writer on the stream. Not insurmountably difficult, but not trivial either. I'd recommend just updating locally and then uploading :)
精彩评论