Skip to content

Commit

Permalink
Merge pull request #2240 from dreamsxin/build
Browse files Browse the repository at this point in the history
Updated BuildCommand
  • Loading branch information
Jeckerson authored May 6, 2021
2 parents 8d3141c + b656c1f commit 2965a43
Showing 1 changed file with 36 additions and 0 deletions.
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

0 comments on commit 2965a43

Please sign in to comment.