Skip to content
Snippets Groups Projects
Commit 2d06fbc1 authored by Sebastien's avatar Sebastien
Browse files

Miminize console log for projects update

parent aafcef5d
No related branches found
No related tags found
No related merge requests found
Pipeline #1030 passed
......@@ -108,7 +108,6 @@ class UpdateAllProjects extends Command
$this->updateProjectDirectory(
$output,
$php_files_count_per_projects,
$current_legacy_path,
$this->capsule_prototype_root
);
......@@ -145,22 +144,16 @@ class UpdateAllProjects extends Command
/**
* @param ConsoleOutputInterface $output
* @param int $php_files_count_per_projects
* @param string $current_legacy_path
* @param string $capsule_prototype_root
* @return void
*/
protected function updateProjectDirectory(
ConsoleOutputInterface $output,
int $php_files_count_per_projects,
string $current_legacy_path,
string $capsule_prototype_root
): void {
$progress_bar = new ProgressBar($output->section(), $php_files_count_per_projects);
$progress_bar->setFormat('project_update_message');
$progress_bar->setMessage($current_legacy_path, 'project');
$progress_bar->start();
$output->writeln("Updating project :{$current_legacy_path}");
// override index.html
$this->file_system->copy(
......@@ -168,7 +161,6 @@ class UpdateAllProjects extends Command
Path::normalize($current_legacy_path . '/index.html'),
true
);
$progress_bar->advance();
// override php files
$this->file_system->mirror(
......@@ -177,7 +169,7 @@ class UpdateAllProjects extends Command
null,
['override' => true, 'delete' => true]
);
$progress_bar->advance($php_files_count_per_projects - 1);
$progress_bar->finish();
$output->writeln("Updating project :{$current_legacy_path} ---> DONE");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment