Esempio n. 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $task = $input->getOption('task');
     $event = new Deploy\Event\Event();
     // $eventInput = new ArrayInput(array('env' => $this->_services['env']));
     $event->setInput($input);
     $event->setOutput($output);
     $event->setCommandCollection($this->_services['console.commands']);
     if ($input->getOption('before')) {
         $this->get('event.dispatcher')->dispatch('cog.deploy.before.' . $task, $event);
     } else {
         $this->get('event.dispatcher')->dispatch('cog.deploy.after.' . $task, $event);
     }
 }
Esempio n. 2
0
 /**
  * Dump and generate the assets on deploy.
  *
  * @param  DeployEvent $event
  */
 public function generateAssetsOnDeploy(DeployEvent $event)
 {
     $event->executeCommand('asset:dump');
     $event->executeCommand('asset:generate');
 }
Esempio n. 3
0
 /**
  * Run the migrations on deploy.
  *
  * @param DeployEvent $event
  */
 public function runMigrations(DeployEvent $event)
 {
     $event->executeCommand('migrate:install');
     // Ensure migrations are set up
     $event->executeCommand('migrate:run');
 }
Esempio n. 4
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $event = new Deploy\Event\Event();
     $event->setOutput($output);
     $this->get('event.dispatcher')->dispatch('cog.deploy.permissions', $event);
 }