views:

25

answers:

1

I have a particular problem with config files and deployment. When I deploy my project, it eventually moves to two different branches: staging and production (using SVN here)

I make the branch from my local working copy of the project. What this ends up doing is overwriting staging and development's copy of the config files, so I manually have to go in and make the correct changes every time I deploy.

Does it make sense to delete the config files from SVN completely since it's set in stone? Or is there another way in doing this?

+2  A: 

What I usually do is maintain multiple configuration files in the repository, but not under the actual name (e.g. in a dedicated folder that gets excluded from deployment). My deployment scripts then copy the appropriate config file into the final location. So my deployment routine goes:

  • checkout
  • compile
  • run deployment script
tdammers
"deployment scripts then copy the appropriate config file into the final location" can you elaborate on this?
tipu
I use scripts to copy the application from an offline folder to its desired location. These scripts create folder structures and copy files, but they can also perform other tasks. For this particular problem, I put a number of different configuration files into a dedicated folder, and the deployment script copies the appropriate one to the live location where the application expects the configuration file.
tdammers