Files
luos/workflow/engine/bin/tasks/cliHotfix.php
Victor Saisa Lopez 45f846f4e7 BUG 12213 "Adicionar soporte para hotfixes" SOLVED
- Nuevo feature
- Funcionalidad para la instalacion de hotfixes
- Nuevo feature implementado, se ha adicionado una nueva opcion al comando ./processmaker
  Esta nueva opcion trabaja de la siguiente manera:
      Caso 1 - ./processmaker hotfix-install MyHotfix.tar
      Caso 2 - ./processmaker hotfix-install path_to_hotfix/MyHotfix.tar
  Para el caso 1, el archivo tar debe estar fisicamente en la ruta:
      path_to_processmaker/shared/hotfixes (si no existe el directorio "hotfixes", crearlo y darle todos los permisos)
  Para el caso 2, el archivo debe existir en la ruta que se especifica
* Available from version ProcessMaker-2.5.1-testing.3
2013-06-26 15:24:18 -04:00

49 lines
1.1 KiB
PHP

<?php
CLI::taskName("hotfix-install");
CLI::taskDescription(<<<EOT
Install hotfix to system
This command is executed when you want to update certain files, which have improvements or bugs solutions.
EOT
);
CLI::taskRun(runHotfixInstall);
function runHotfixInstall($command, $args)
{
CLI::logging("HOTFIX", PATH_DATA . "log" . PATH_SEP . "upgrades.log");
CLI::logging("Install hotfix to system\n");
$arrayFile = $command;
if (count($arrayFile) > 0) {
//Install hotfix
foreach ($arrayFile as $value) {
$f = $value;
$result = workspaceTools::hotfixInstall($f);
CLI::logging($result["message"] . "\n");
}
//Clear server's cache
CLI::logging("\nClearing cache...\n");
if (defined("PATH_C")) {
G::rm_dir(PATH_C);
G::mk_dir(PATH_C, 0777);
}
//Safe upgrade for JavaScript files
CLI::logging("\nSafe upgrade for files cached by the browser\n\n");
G::browserCacheFilesSetUid();
CLI::logging("HOTFIX done\n");
} else {
CLI::logging("Please specify the hotfix to install\n");
}
}