hotfix: Added aliases, implemented new runners

This commit is contained in:
2016-12-11 22:36:27 +01:00
parent 8e8cb05674
commit 302e5a50ce
23 changed files with 597 additions and 225 deletions

View File

@ -12,8 +12,25 @@ class RunnerFactory
public static function createRunner(Hotfix $hotfix)
{
$facts = Facts::getSystemFacts();
$meta = $hotfix->getHeader();
switch ($meta->getLanguage()) {
case 'php':
$runner = new PhpRunner();
break;
case 'bash':
$runner = new BashRunner();
break;
case 'python':
$runner = new PythonRunner();
break;
default:
throw new UnsupportedRunnerException("This version of hotfix doesn't support the runner ".$meta->getLanguage());
}
$runner->prepare($hotfix, $facts);
return $runner;
}
}