public function main()
{
if (!empty($this->params['dry-run'])) {
$this->out('<warning>Dry-run mode enabled!</warning>', 1, Shell::QUIET);
}
$exclude = ['.git', '.svn', 'vendor', 'Vendor', 'webroot', 'tmp', 'logs'];
if (empty($this->params['plugin']) && !empty($this->params['namespace']) && $this->params['namespace'] === 'App') {
$exclude[] = 'plugins';
$exclude[] = 'Plugin';
}
$files = $this->Stage->files($exclude);
foreach ($files as $file) {
$this->out(sprintf('<info>Processing %s</info>', Debugger::trimPath($file)));
$this->process($file);
}
$this->Stage->commit();
}