Example #1
0
 public function handle()
 {
     $path = $this->repo->repoPath();
     if (!$this->fs->isDirectory($path) && !$this->fs->makeDirectory($path, 0755, true)) {
         throw new \RuntimeException(sprintf("Cannot create repo dir %s", $path));
     }
     Admin::cloneTo($path, $this->repo->url, true, config('git.options'));
     $this->repo->git()->run('config', ['remote.origin.fetch', 'refs/heads/*:refs/heads/*']);
 }
Example #2
0
 /**
  * @return bool
  */
 public function handle()
 {
     if (!$this->removeDir($this->repo->repoPath())) {
         throw new \RuntimeException(sprintf("Failed to delete %s", $this->repo->repoPath()));
     }
     if (!$this->removeDir($this->repo->releasePath())) {
         throw new \RuntimeException(sprintf("Failed to delete %s", $this->repo->releasePath()));
     }
     $this->repo->delete();
 }