Just to throw another method into the mix, this is the method I use:
include_once('config.php');
if(file_exists('config.dev.php')) {
include_once('config.dev.php');
}
The production config.php is kept in the repository, and the config.dev.php
is added to svn:ignore.
Using this method you can have multiple dev/test/UAT environments each with
their own custom config files, and the production environment will be ready
to roll after export.
Thanks,
Nathan.
http://www.kennedytechnology.com
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of .Net2Php
Sent: Wednesday, 27 May 2009 12:37 p.m.
To: NZ PHP Users Group
Subject: [phpug] OT: Any Subversion Experts Here?
We have a repository, from which we can do an "svn up" from our
development server's public_html folder via SSH. This works fine as
all the latest revisions are deployed (is "deployed" the correct
term?).
We have a production server, also. We can log in to this server via
SSH, go to it's public_html, and do an "svn up." An exact copy of what
is deployed to our development server is deployed to our production
server.
Here's the catch: some of the files need to be different from
development to production server (primarily configuration files). How
should we set this up such that when we deploy to the development
server, we get the development configuration files -- and when we
deploy to the production server, we get the production configuration
files?
New to Subversion administration and only know basic Linux. My guess
is that this probably has something to do with branches. Deploy this
branch to this server; deploy that branch to that server. Thanks.
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---