Example #1
0
 protected function executeTaskrunner(Context $context)
 {
     $this->io->write('');
     if (true === $context->isSimulate()) {
         $this->io->write(sprintf('Simulating tasks before deploy'));
     } else {
         $this->io->write(sprintf('Running tasks before deploy'));
     }
     $this->io->increaseIndention(1);
     if (true === $context->isSimulate()) {
         $this->taskRunner->simulate($context->getTarget(), $context->getVersion());
     } else {
         $this->taskRunner->execute($context->getTarget(), $context->getVersion());
     }
     $this->io->decreaseIndention(1);
 }
Example #2
0
 public function execute(Context $context)
 {
     $filesModified = $context->getFilesModified();
     $filesDeleted = $context->getFilesDeleted();
     if ($this->io) {
         $this->io->write('');
         if (true === $context->isSimulate()) {
             $this->io->write(sprintf('Simulating upload to <info>%s</info>', $context->getTarget()));
         } else {
             $this->io->write(sprintf('Uploading to <info>%s</info>', $context->getTarget()));
         }
         $this->io->write(sprintf(' - Uploading to <comment>%s</comment>', $this->transporter->getHost()));
         $this->io->increaseIndention(3);
     }
     $this->uploadFiles($filesModified->toArray(), $context);
     $this->removeFiles($filesDeleted->toArray(), $context);
     if ($this->io) {
         if (true === $this->showProgress) {
             // clear last line, because it was a overwrite
             $this->io->write('');
         }
         $this->io->decreaseIndention(3);
     }
 }
 public function supports(Context $context)
 {
     return false === $context->isSimulate();
 }