mirror of
https://github.com/opdavies/versa.git
synced 2025-03-13 05:26:56 +00:00
Add versa build
for Sculpin projects
This commit is contained in:
parent
f01f7b422d
commit
179b857488
|
@ -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
11
versa
|
@ -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]));
|
||||
|
|
Loading…
Reference in a new issue