예제 #1
0
 public function doInstallAction($params)
 {
     if (!strlen($params['name'])) {
         return false;
     }
     $deployer = new \Innomatic\Module\Deploy\ModuleDeployer();
     return $deployer->deploy($this->basedir . '/core/modules/' . $params['name']);
 }
예제 #2
0
    $argv[1] = '';
}
try {
    switch ($argv[1]) {
        case '-h':
            print 'Usage: php innomatic/core/scripts/moduledeployer.php command argument' . "\n";
            print "\n";
            print 'Supported commands:' . "\n";
            print '    deploy modulefile      Deploys a module' . "\n";
            print '    redeploy modulefile    Redeploys a mdoule' . "\n";
            print '    undeploy modulename    Undeploys a module' . "\n";
            $script->cleanExit();
            break;
        case 'deploy':
            $deployer = new \Innomatic\Module\Deploy\ModuleDeployer();
            if ($deployer->deploy($argv[2])) {
                print 'Module deployed' . "\n";
            } else {
                print 'Unable to deploy module' . "\n";
                $script->cleanExit(1);
            }
            break;
        case 'redeploy':
            $deployer = new \Innomatic\Module\Deploy\ModuleDeployer();
            if ($deployer->redeploy($argv[2])) {
                print 'Module redeployed' . "\n";
            } else {
                print 'Unable to redeploy module' . "\n";
                $script->cleanExit(1);
            }
            break;