Add versa build for Sculpin projects

This commit is contained in:
Oliver Davies 2024-02-20 00:50:05 +00:00
parent f01f7b422d
commit 179b857488
2 changed files with 12 additions and 0 deletions

View file

@ -2,6 +2,7 @@
## Unreleased
* Add `versa build` to build a Sculpin project.
* Add `--extra-args` to pass extra arguments to the underlying command.
* Prevent timeout errors with `versa run`.

11
versa
View file

@ -50,6 +50,17 @@ $application->setCode(function (InputInterface $input): int {
// TODO: only allow defined commands - build, install, test, run.
switch ($input->getArgument('command')) {
case 'build':
switch ($input->getOption('type')) {
case 'sculpin':
$process = new Process(command: array_filter(['./vendor/bin/sculpin', 'generate', $extraArgs]));
$process->setTty(true);
$process->setWorkingDirectory($workingDir);
$process->run();
break;
}
break;
case 'install':
// TODO: Composer in Docker Compose?
$process = new Process(command: array_filter(['composer', 'install', $extraArgs]));