* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Deploys a project to another server. * * @package symfony * @subpackage task * @author Fabien Potencier * @version SVN: $Id: sfProjectDeployTask.class.php 23439 2009-10-29 16:21:03Z fabien $ */ class sfProjectDeployTask extends sfBaseTask { /** * @see sfTask */ protected function configure() { $this->addArguments(array( new sfCommandArgument('server', sfCommandArgument::REQUIRED, 'The server name'), )); $this->addOptions(array( new sfCommandOption('go', null, sfCommandOption::PARAMETER_NONE, 'Do the deployment'), new sfCommandOption('rsync-dir', null, sfCommandOption::PARAMETER_REQUIRED, 'The directory where to look for rsync*.txt files', 'config'), new sfCommandOption('rsync-options', null, sfCommandOption::PARAMETER_OPTIONAL, 'To options to pass to the rsync executable', '-azC --force --delete'), )); $this->aliases = array('sync'); $this->namespace = 'project'; $this->name = 'deploy'; $this->briefDescription = 'Deploys a project to another server'; $this->detailedDescription = <<log($this->getFilesystem()->sh("rsync --progress $dryRun $parameters -e $ssh ./ $user$host:$dir")); } }