Skip to content

Commit

Permalink
Added option into the Cloud's remove command
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Jan 15, 2024
1 parent fbcf60a commit 38cccb5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Builder/API/APIRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Ps\\Log\\NullLogger')
class: new Node\Name\FullyQualified('Psr\\Log\\NullLogger')
)
),
]
Expand Down
3 changes: 2 additions & 1 deletion src/Cloud/Console/Command/RemoveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ protected function configure(): void
$this->addOption('url', 'u', mode: Console\Input\InputArgument::OPTIONAL, description: 'Base URL of the cloud instance', default: 'https://app.gyroscops.com');
$this->addOption('beta', mode: Console\Input\InputOption::VALUE_NONE, description: 'Shortcut to set the cloud instance to https://beta.gyroscops.com');
$this->addOption('ssl', mode: Console\Input\InputOption::VALUE_NEGATABLE, description: 'Enable or disable SSL');
$this->addOption('output', mode: Console\Input\InputOption::VALUE_OPTIONAL, description: 'Specify the path of the working directory');
$this->addArgument('config', mode: Console\Input\InputArgument::REQUIRED);
}

Expand Down Expand Up @@ -70,7 +71,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
}

$context = new Satellite\Console\RuntimeContext(
'php://fd/3',
$input->getOption('output') ?? 'php://fd/3',
new Satellite\ExpressionLanguage\ExpressionLanguage(),
);

Expand Down
6 changes: 3 additions & 3 deletions src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ private function compileWorkflow(array $config): Satellite\Builder\Repository\Wo
)
);

foreach ($config['workflow']['jobs'] as $job) {
foreach ($config['workflow']['jobs'] as $code => $job) {
if (\array_key_exists('pipeline', $job)) {
$pipeline = $this->compilePipelineJob($job);
$pipelineFilename = sprintf('%s.php', uniqid('pipeline'));
Expand All @@ -293,7 +293,7 @@ private function compileWorkflow(array $config): Satellite\Builder\Repository\Wo
)
);

$workflow->addPipeline($job['pipeline']['code'], $pipelineFilename);
$workflow->addPipeline($code, $pipelineFilename);
} elseif (\array_key_exists('action', $job)) {
$action = $this->compileActionJob($job);
$actionFilename = sprintf('%s.php', uniqid('action'));
Expand All @@ -310,7 +310,7 @@ private function compileWorkflow(array $config): Satellite\Builder\Repository\Wo
)
);

$workflow->addAction($job['action']['code'], $actionFilename);
$workflow->addAction($code, $actionFilename);
} else {
throw new \LogicException('Not implemented');
}
Expand Down

0 comments on commit 38cccb5

Please sign in to comment.