Magallanes deployment tool PHP -
i use magallanes deploy projects, , problem have how can catch errors during deployment, example when throw command create database, exist.
and other how can return personalized messages tasks, example
<?php namespace task; use mage\task\abstracttask; class assignpermissions extends abstracttask { public function getname() { return 'asignando permisos ' . $this->getparameter('permission','') . ' la carpeta ' . $this->getparameter('target',''); } public function run() { $permission = $this->getparameter('permission',''); $target = $this->getparameter('target',''); if($permission == '' , $target == '') { return false; } $result = $this->runcommandremote('chmod ' . $permission . ' ' . $target); return $result; } }
if permission parameter empty, return "the permission required"
thanks , regards!
Comments
Post a Comment