コード例 #1
0
ファイル: Deploy.php プロジェクト: anorgan/deployer-cli
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $config = $this->getApplication()->getConfig();
     $destination = $input->getArgument('destination');
     $verbosityLevelMap = [LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL];
     $logger = new ConsoleLogger($output, $verbosityLevelMap);
     $config = $config[$destination];
     $deployRunner = Deployer::create($config, $logger);
     $deployRunner->run();
 }
コード例 #2
0
ファイル: Info.php プロジェクト: anorgan/deployer-cli
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $config = $this->getApplication()->getConfig();
     foreach ($config as $destination => $destinationConfig) {
         $deployRunner = Deployer::create($destinationConfig);
         $output->writeln('<info>' . $destination . '</info>:');
         foreach ($deployRunner->getSteps() as $step) {
             $output->writeln('<comment>' . $step->getTitle() . '</comment>');
             foreach ($step->getCommands() as $command) {
                 $output->writeln('  ' . $command);
             }
         }
     }
 }