Skip to content

Commit

Permalink
IMPROVEMENT: Now it's possible to use the option only-database to con…
Browse files Browse the repository at this point in the history
…trol either or not the content (typicall uploads) will be synchronized.
  • Loading branch information
ribeiropaulor committed Dec 11, 2012
1 parent 8c67441 commit 20fc038
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Command/SyncFromCommand.php
Expand Up @@ -27,7 +27,7 @@ protected function configure()
->setName('bfos:sync-content:from')
->setDescription('Synchronize content FROM another server')
->addArgument('remoteenv', InputArgument::REQUIRED, 'The environment name and server name concatenated by @ .')
// ->addOption('env', null, InputOption::VALUE_OPTIONAL, 'The local environment name to be used.', 'dev')
->addOption('only-database', null, InputOption::VALUE_OPTIONAL, 'Indicates that only the database content should be synchronized.', false)
->setHelp(<<<EOF
The <info>bosf:sync-content:from</info> command synchronize the content from a remote server to your computer:
Expand Down Expand Up @@ -91,7 +91,9 @@ protected function execute(InputInterface $input, OutputInterface $output)

// END - mysql

$this->synchronize_content('from', $server, $manager, $output);
if(!$input->getOption('only-database')){
$this->synchronize_content('from', $server, $manager, $output);
}



Expand Down
8 changes: 4 additions & 4 deletions Command/SyncToCommand.php
Expand Up @@ -27,7 +27,7 @@ protected function configure()
->setName('bfos:sync-content:to')
->setDescription('Synchronize content TO another server')
->addArgument('remoteenv', InputArgument::REQUIRED, 'The environment name and server name concatenated by @ .')
// ->addOption('env', null, InputOption::VALUE_OPTIONAL, 'The local environment name to be used.', 'dev')
->addOption('only-database', null, InputOption::VALUE_OPTIONAL, 'Indicates that only the database content should be synchronized.', false)
->setHelp(<<<EOF
The <info>bosf:sync-content:to</info> command synchronize the content from your computer to a remote server:
Expand Down Expand Up @@ -89,9 +89,9 @@ protected function execute(InputInterface $input, OutputInterface $output)

// END - mysql

$this->synchronize_content('to', $server, $manager, $output);


if(!$input->getOption('only-database')){
$this->synchronize_content('to', $server, $manager, $output);
}

$output->writeln('Synchronization was successful.');
return true;
Expand Down

0 comments on commit 20fc038

Please sign in to comment.