Пример #1
0
 /**
  * Send deployment report to dropbox account
  *
  * @return \Deployer
  */
 public function report()
 {
     $reports = array();
     $allReports = sizeof($this->_report);
     if ($allReports > 0) {
         self::messageHeader('Sending reports');
     }
     foreach ($this->_report as $report) {
         $provider = $report['provider'];
         $format = isset($report['format']) ? $report['format'] : 'txt';
         if (!isset($reports[$format])) {
             list($reports[$format]['mime'], $reports[$format]['data']) = $this->_logger->report($format);
             $reprts[$format]['data'] = \Deployer::censor($reports[$format]['data']);
         }
         $message = \Deployer\Report::instance($provider)->params($report)->mime($reports[$format]['mime'])->data($reports[$format]['data'])->send()->report();
         \Deployer\CLI::writeLn(sprintf(' * %s', $message));
     }
     if ($allReports > 0) {
         \Deployer\CLI::writeLn();
     }
     return $this;
 }