Advice?

Pete Mounce
Pete Mounce
We use SubVersion at work, and we make ASP.NET websites.    We want to find out how to deploy development code from a tag to our staging/live servers, preferably in as few steps as possible. Our eventual goal is a deploy script, which (absent database changes and data changes that can't easily be source controlled) is a one-step "deploy tag copy to server and make live" type of thing.    One of the things that regularly bites us in the ass is forgetting to make a backup of the server web.config, which invariably has different settings than the current trunk dev copy one. However, we still want it to be source controlled. Even now that we remember, it's still and irritating manual-compare step...    Has anyone got any useful links/suggestions on either point, please?

Last updated

k-dub
k-dub
You could use a little NAnt script to push to production. The task should do the replacements you need.
projxpert
projxpert
Subversion deployment with Asp.Net    Possibly the most straight forward way of drawing code from the repository via nant is by running TortoiseSVN from the command line.                 commandline="/command:update /path:. /notempfile /closeonend"   basedir="${project::get-base-directory()}"   failonerror="false"/>                  We use 3 web.config files to manage our 3 development environments. Then when nant is run it copies the required one. This is still not the ideal solution as you can forget to put values in the config for one of them.                                    You get the idea. Hope this helps.
k-dub
k-dub
That's a fine example, but I don't see the need to maintain three different copies of the same config file. The parts of the file that are different can be set to the appropriate value by the "xmlpoke" task. For example, if you have different database connection strings for development, staging, and production, you could have each value as a property in the nant script and the targets you describe would set the appropriate value.    http://nant.sourceforge.net/nightly/help/tasks/xmlpoke.html

1-4 of 4

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.