1 | <?php |
||
8 | class HookHandler |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | private $scripts; |
||
15 | |||
16 | /** |
||
17 | * @var Executor |
||
18 | */ |
||
19 | private $executor; |
||
20 | |||
21 | |||
22 | 8 | public function __construct(ContainerInterface $ci, Executor $executor) |
|
27 | |||
28 | |||
29 | 1 | public function handleDeploy(array $event, array $build) |
|
46 | |||
47 | |||
48 | 1 | public function handlePush(array $event) |
|
61 | |||
62 | |||
63 | 3 | public function handleTag(array $event) |
|
75 | |||
76 | |||
77 | /** |
||
78 | * @param string $ref |
||
79 | * @return string |
||
80 | */ |
||
81 | 1 | private function extractBranchName($ref) |
|
85 | |||
86 | |||
87 | /** |
||
88 | * @param string $ref |
||
89 | * @return string |
||
90 | */ |
||
91 | 3 | private function extractTagName($ref) |
|
95 | |||
96 | |||
97 | /** |
||
98 | * @param string|array $scriptPath |
||
99 | * @param array $env |
||
100 | */ |
||
101 | 5 | private function executeCommand($scriptPath, array $env) |
|
105 | |||
106 | } |
||
107 |