mxriverlynn / Albacore

Dolphin-Safe Rake Tasks For .NET Systems
http://albacorebuild.net
240 stars 71 forks source link

Poke Xml Files (e.g. web.config) and change values when needed (say deployment) #167

Open jssingh opened 13 years ago

jssingh commented 13 years ago

When deploying code and using web.config for configuration, it is needed to change App Settings for multiple environments.

mxriverlynn commented 13 years ago

I've never been a fan of xml poke for this purpose. i prefer to use a template for my web.config and generate the file for each of the environments... there used to be an expandtemplates task for this purpose but it was pretty awful. with erb bing built into ruby and the availability of erubis, haml, slim, etc, it's a better idea to use one of them to process templates.

there's an example of building your own albacore task to do this in the wiki: https://github.com/derickbailey/Albacore/wiki/Custom-Tasks

otherwise - contributions are welcome. pull requests are accepted :)

jssingh commented 13 years ago

hey Derrick, thanks for the response. I will check it out. I certainly like templating better myself vs acting sneaky :)

haf commented 12 years ago

I think it would be nice to have an erb task. In fact, I have written one from Derick's sample. I'll try to add it to dev.

mxriverlynn commented 12 years ago

this was sort of re-added in the "output" task. you might want to check that to see if it's going to be good enough.