Skip to content

Commit a79abe8

Browse files
committed
Merge branch 'develop'
2 parents 3f2faa8 + 3d0a81e commit a79abe8

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

EventListener/BuildEventListener.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ public function onBuild(BuildEvent $event)
2626
$servers = $this->entityManager->getRepository(VirtualServer::class)->findAll();
2727

2828
foreach ($servers as $server) {
29+
30+
$manageCapistrano = $this->dataValueService->getValue($server, 'manage_capistrano');
31+
32+
if (!$manageCapistrano) {
33+
continue;
34+
}
35+
2936
if ($server->getEnvironment() != $environment) {
3037
continue;
3138
}

Provider/DataTypeProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ public function getDataTypes()
2828
'field_type' => 'string',
2929
'entity_types' => ['server'],
3030
],
31+
[
32+
'key' => 'manage_capistrano',
33+
'label' => 'Manage capistrano',
34+
'required' => false,
35+
'field_type' => 'boolean',
36+
'entity_types' => ['server'],
37+
],
3138
[
3239
'key' => 'capistrano_file',
3340
'label' => 'Capistrano file',

Tests/EventListener/BuildEventistenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testOnBuild()
4747

4848
$event = new BuildEvent($task);
4949

50-
$dataValueService = $this->getDataValueServiceMock(['user']);
50+
$dataValueService = $this->getDataValueServiceMock([true,'user']);
5151
$templateService = $this->getTemplateServiceMock();
5252
$taskLoggerService = $this->getTaskLoggerServiceMock();
5353
$entityManager = $this->getEntityManagerMock();

0 commit comments

Comments
 (0)