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)
 {
     if (true !== $this->validateBuildDir($context->isForce())) {
         return false;
     }
     $this->io->write('');
     $this->io->write(sprintf('Building <info>%s</info> (<comment>%s</comment>) to <info>%s</info>', $context->getVersion()->getName(), $context->getTarget(), $context->getBuilddir()));
     $this->io->increaseIndention(1);
     $this->builder->setContext($context);
     $this->builder->build($context->getTarget(), $context->getVersion());
     $this->io->decreaseIndention(1);
     return true;
 }
Example #3
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);
     }
 }
Example #4
0
 /**
  * Execute a single task
  *
  * @param Context $context
  *
  * @return void
  */
 protected function executeTaskrunner(Context $context)
 {
     $this->io->write('');
     $this->io->increaseIndention(1);
     $this->taskRunner->execute($context->getTarget(), $context->getVersion());
     $this->io->decreaseIndention(1);
 }