Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
32 righe
872 B
32 righe
872 B
<?php |
|
/* |
|
Non indicare ambito o patch eseguirà tutto quello che è disponibile |
|
$options = [ |
|
"ambito": main / tenant |
|
"patch": nome della patch da eseguire |
|
"make": nome della patch da creare |
|
"rollback": nome della patch da annullare |
|
] |
|
*/ |
|
if (php_sapi_name() == "cli") { |
|
include (__DIR__."/config.php"); |
|
include (__DIR__."/patches/tuttogarePatch.class.php"); |
|
$options = PatchManager::getOptionsFromCli($argv); |
|
function close() { |
|
echo PHP_EOL; |
|
} |
|
register_shutdown_function("close"); |
|
if (!empty($options["make"])) { |
|
if (!empty($options["ambito"])) { |
|
if (!PatchManager::makePatchFile($options["ambito"],$options["make"])) { |
|
die("Si è verificato un errore"); |
|
} |
|
die(); |
|
} else { |
|
die("--ambito obbligatorio"); |
|
} |
|
} |
|
$runner = new PatchManager($options); |
|
$runner->run(); |
|
} |
|
?> |