Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated BuildCommand #2240

Merged
merged 2 commits into from
May 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions Library/Console/Command/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,42 @@ protected function configure()

protected function execute(InputInterface $input, OutputInterface $output)
{
// call generate
$command = $this->getApplication()->find('generate');
$io = new SymfonyStyle($input, $output);

$arguments = [
'command' => 'generate',
'--backend' => $input->getOption('backend'),
];

try {
$command->run(new ArrayInput($arguments), $output);
} catch (\Exception $e) {
$io->getErrorStyle()->error($e->getMessage());

return 1;
}

// call compile
$command = $this->getApplication()->find('compile');
$io = new SymfonyStyle($input, $output);

$arguments = [
'command' => 'compile',
'--backend' => $input->getOption('backend'),
'--dev' => $this->isDevelopmentModeEnabled($input),
];

try {
$command->run(new ArrayInput($arguments), $output);
} catch (\Exception $e) {
$io->getErrorStyle()->error($e->getMessage());

return 1;
}

// call install
$command = $this->getApplication()->find('install');
$io = new SymfonyStyle($input, $output);

Expand Down