Example #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $version = $input->getArgument('version');
     if ($version == NULL) {
         $version = sprintf('deploy_%s', date("YmdHis"));
         $this->repo->tagCreate($version);
     }
     try {
         $sync = new \Rsync($this->config);
         $sync->run();
     } catch (\Exception $exception) {
         if ($input->getArgument('version') == NULL) {
             $this->repo->tagDelete($version);
         }
         throw $exception;
     }
 }
Example #2
0
 /**
  * Tests Rsync::createProcess
  *
  * @expectedException \phpbu\App\Exception
  */
 public function testNoTarget()
 {
     $path = realpath(__DIR__ . '/../../../_files/bin');
     $rsync = new Rsync($path);
     $rsync->syncFrom('./foo');
     $rsync->getCommandLine();
 }