File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 ' ,
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments