Exemple #1
0
 /**
  * Commit.
  *
  * @param $output
  */
 protected function commit(SyncOutputContract $output)
 {
     if ($this->git->hasChanges()) {
         $commit = $this->git->commit();
         // Display the output
         if (isset($commit['name']) && isset($commit['data'])) {
             $output->out($commit['name'], $commit['data']);
         }
     }
     // Free some RAM
     unset($commit);
 }
Exemple #2
0
 /**
  * Commit.
  */
 public function commit()
 {
     $this->git->add('.', ['all' => null])->commit('backup ' . date('Y-m-d H:i:s'));
     return ['name' => 'gitCommit', 'data' => ['gitOutput' => $this->git->getOutput()]];
 }