1 | <?php |
||
11 | final class GitCommandRunner implements VCSCommandRunner |
||
12 | { |
||
13 | private const DEFAULT_REMOTE_NAME = 'origin'; |
||
14 | |||
15 | /** |
||
16 | * @param string $source |
||
17 | * @param string $branch |
||
18 | * @param string $workingDirectory |
||
19 | */ |
||
20 | public function clone(string $source, string $branch, string $workingDirectory): void |
||
27 | |||
28 | /** |
||
29 | * @param string $workingDirectory |
||
30 | * |
||
31 | * @throws ProcessFailedException |
||
32 | * |
||
33 | * @return array |
||
34 | */ |
||
35 | public function listTags(string $workingDirectory): array |
||
48 | |||
49 | /** |
||
50 | * @param string $workingDirectory |
||
51 | * |
||
52 | * @throws ProcessFailedException |
||
53 | */ |
||
54 | public function pull(string $workingDirectory): void |
||
59 | |||
60 | /** |
||
61 | * @param string $workingDirectory |
||
62 | * @param null|string $remoteName |
||
63 | * |
||
64 | * @throws ProcessFailedException |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function getRemoteUrl(string $workingDirectory, ?string $remoteName = null): string |
||
78 | |||
79 | /** |
||
80 | * @param string $workingDirectory |
||
81 | */ |
||
82 | private function fetch(string $workingDirectory): void |
||
87 | } |
||
88 |