| 1 | <?php namespace Packedge\Workbench\Tools; |
||
| 5 | class Git |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | protected $repositoryPath; |
||
| 11 | /** |
||
| 12 | * @var ExecutableFinder |
||
| 13 | */ |
||
| 14 | private $executableFinder; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param string $repositoryPath |
||
| 18 | * @param ExecutableFinder $executableFinder |
||
| 19 | */ |
||
| 20 | public function __construct($repositoryPath, ExecutableFinder $executableFinder) |
||
| 25 | |||
| 26 | public function hasGit() |
||
| 31 | |||
| 32 | public function init() |
||
| 36 | |||
| 37 | public function add(array $files) |
||
| 41 | |||
| 42 | public function addAll() |
||
| 46 | |||
| 47 | public function commit($message) |
||
| 51 | |||
| 52 | public function setRemote($url) |
||
| 56 | |||
| 57 | public function push() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $command |
||
| 64 | * @throws RuntimeException |
||
| 65 | */ |
||
| 66 | protected function execute($command) |
||
| 77 | } |