When promoting or deploying a build, I'd like to automate swapping out a single database connection file. This could be done as either a post-build step or as a pre-packaging step before deployment.
The file that's being swapped out is a test file; the file being swapped in should have the real database connection configuration.
How can this be done? I use Hudson as the CI server, if that helps, and use GitHub for SCM.
Manual swapping of the files, IMHO, is fraught with human error and can be altogether forgotten. Plus it adds just one more thing to do and impedes the momentum of a continuous deployment cycle.