3

I am unable to find the documentation on how to set it up with SVN. Am I missing something? I have tried in my deploy.php file:

require 'recipe/common.php';
server('ec2', 'server')
    ->user('user')
    ->pemFile('key.pem')
    ->env('deploy_path', '/var/www/website'); 
set('repository', 'http://user:password@x.x.x.x/repos/branches/development/');

I think that that is looking for a git file though. Can you help please?

Many thanks!

Adam
  • 3,415
  • 4
  • 30
  • 49

2 Answers2

3

Overriding tasks is quite easy. Here, is a sample of deploy.php to use svn export functionality to achieve deployment from svn repository:

//Set svn specific variables
set('svnrepo', 'http://x.x.x.x/repos/branches/development/');
set('svnuser', 'user');
set('svnpass', 'password');

/**
 * Update project code, override git, use svn instead.
 */
task('deploy:update_code', function () {
    $svn = '/usr/bin/svn';
    $repository = trim(get('svnrepo'));
    $user = trim(get('svnuser'));
    $pass = trim(get('svnpass'));
    run("$svn export --force --username $user --password $pass $repository {{release_path}} 2>&1");
})->desc('Updating code');

Also it could be written as svn up command, but in my personal opinion, who needs .svn files in prod environments?

Vaidas
  • 158
  • 1
  • 11
1

You can do it by you own. Just override deploy:update_code task.

Anton Medvedev
  • 3,393
  • 3
  • 28
  • 40