Albacore icon indicating copy to clipboard operation
Albacore copied to clipboard

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

Open jssingh opened this issue 13 years ago • 4 comments

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

jssingh avatar Aug 26 '11 20:08 jssingh

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 :)

mxriverlynn avatar Aug 26 '11 21:08 mxriverlynn

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

jssingh avatar Aug 26 '11 21:08 jssingh

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.

haf avatar Jan 31 '12 12:01 haf

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.

mxriverlynn avatar Jan 31 '12 19:01 mxriverlynn