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
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
<?php
|
||||
CLI::taskName("patch-install");
|
||||
CLI::taskName("hotfix-install");
|
||||
|
||||
CLI::taskDescription(<<<EOT
|
||||
Install patch to system
|
||||
Install hotfix to system
|
||||
|
||||
This command is executed when you want to update certain files, which have improvements or solution to bugs.
|
||||
EOT
|
||||
);
|
||||
|
||||
CLI::taskRun(runPatchInstall);
|
||||
CLI::taskRun(runHotfixInstall);
|
||||
|
||||
function runPatchInstall($command, $args)
|
||||
function runHotfixInstall($command, $args)
|
||||
{
|
||||
CLI::logging("PATCH", PATH_DATA . "log" . PATH_SEP . "upgrades.log");
|
||||
CLI::logging("Install patch to system\n");
|
||||
CLI::logging("HOTFIX", PATH_DATA . "log" . PATH_SEP . "upgrades.log");
|
||||
CLI::logging("Install hotfix to system\n");
|
||||
|
||||
$arrayFile = $command;
|
||||
|
||||
if (count($arrayFile) > 0) {
|
||||
//Install patch
|
||||
//Install hotfix
|
||||
foreach ($arrayFile as $value) {
|
||||
$f = $value;
|
||||
|
||||
$result = workspaceTools::patchInstall($f);
|
||||
$result = workspaceTools::hotfixInstall($f);
|
||||
|
||||
CLI::logging($result["message"] . "\n");
|
||||
}
|
||||
@@ -40,9 +40,9 @@ function runPatchInstall($command, $args)
|
||||
|
||||
G::browserCacheFilesSetUid();
|
||||
|
||||
CLI::logging("PATCH done\n");
|
||||
CLI::logging("HOTFIX done\n");
|
||||
} else {
|
||||
CLI::logging("Not exist patchs to install in the command\n");
|
||||
CLI::logging("Not exist hotfixes to install in the command\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1308,21 +1308,21 @@ class workspaceTools
|
||||
CLI::logging(CLI::info("Done restoring") . "\n");
|
||||
}
|
||||
|
||||
public static function patchInstall($file)
|
||||
public static function hotfixInstall($file)
|
||||
{
|
||||
$result = array();
|
||||
|
||||
$dirPatch = PATH_DATA . "patchs";
|
||||
$dirHotfix = PATH_DATA . "hotfixes";
|
||||
|
||||
$arrayPathInfo = pathinfo($file);
|
||||
|
||||
$f = ($arrayPathInfo["dirname"] == ".")? $dirPatch . PATH_SEP . $file : $file;
|
||||
$f = ($arrayPathInfo["dirname"] == ".")? $dirHotfix . PATH_SEP . $file : $file;
|
||||
|
||||
$swv = 1;
|
||||
$msgv = "";
|
||||
|
||||
if (!file_exists($dirPatch)) {
|
||||
G::mk_dir($dirPatch, 0777);
|
||||
if (!file_exists($dirHotfix)) {
|
||||
G::mk_dir($dirHotfix, 0777);
|
||||
}
|
||||
|
||||
if (!file_exists($f)) {
|
||||
@@ -1345,7 +1345,7 @@ class workspaceTools
|
||||
|
||||
if ($swTar) {
|
||||
$result["status"] = 1;
|
||||
$result["message"] = "- Successfully to install patch \"$f\"";
|
||||
$result["message"] = "- Successfully to install hotfix \"$f\"";
|
||||
} else {
|
||||
$result["status"] = 0;
|
||||
$result["message"] = "- Could not extract file \"$f\"";
|
||||
|
||||
Reference in New Issue
Block a user