feat(updater): use nobackup option instead of backup
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Florian Schmitt 2025-03-27 13:17:06 +03:00
parent 107bd64253
commit a5c6a74f2b
2 changed files with 9 additions and 9 deletions

View file

@ -39,11 +39,11 @@ if ($isRoot) {
'description' => 'Update to latest version of stable yeswiki',
'noValue' => true
],
'backup' => [
'prefix' => 'b',
'longPrefix' => 'backup',
'description' => 'Save a backup in /root/yeswiki_backups folder before upgrading the yeswiki',
'defaultValue' => true
'nobackup' => [
'prefix' => 'nobackup',
'longPrefix' => 'nobackup',
'description' => 'Do not save a backup in /root/yeswiki_backups folder before upgrading the yeswiki',
'noValue' => true
],
'depth' => [
'prefix' => 'd',
@ -66,7 +66,7 @@ if ($isRoot) {
try {
$update = $climate->arguments->get('update');
$output = $climate->arguments->get('output');
$backup = $climate->arguments->get('backup');
$nobackup = $climate->arguments->get('nobackup');
$depth = $climate->arguments->get('depth');
$matches = searchWikis($path, 'wakka.config.php', $depth);
if (count($matches) == 0) {
@ -94,7 +94,7 @@ if ($isRoot) {
} elseif ($wiki['RELEASE'] == $version) {
$climate->info('Skipping up-to-date wiki '.$wiki['URL']);
} else {
$climate->info(upgradeWiki($destDir, $wiki['PATH'], $backup));
$climate->info(upgradeWiki($destDir, $wiki['PATH'], $nobackup));
}
}
} else { // show yeswiki list info