Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion src/Commands/Deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ protected function configure(): void
->setName('deploy')
->setDescription('Deploy the application')
->addOption('force', null, InputOption::VALUE_NONE, 'Force the deployment')
->addOption('osls4', null, InputOption::VALUE_NONE, 'Use osls@4 instead of osls@3')
->addOption('osls3', null, InputOption::VALUE_NONE, 'Deploy with osls 3 instead of osls 4 (for applications that osls 4 rejects)')
// osls 4 is the default now, the option is kept for the scripts that pass it
->addOption('osls4', null, InputOption::VALUE_NONE, 'Deprecated: osls 4 is the default')
->addOption('param', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Pass a parameter to serverless.yml, e.g. --param="key=value" (can be repeated)');
parent::configure();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Components/ServerlessFramework.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public function deploy(int $deploymentId, string $environment, array $awsCredent
if ($input->hasOption('force') && $input->getOption('force')) {
$options[] = '--force';
}
$oslsPackage = ($input->hasOption('osls4') && $input->getOption('osls4')) ? 'osls@4' : 'osls@3';
// A minimum version, not `osls@4`: npx would run any osls 4 already installed, e.g. one too old for Bref v4
$oslsPackage = ($input->hasOption('osls3') && $input->getOption('osls3')) ? 'osls@3' : 'osls@^4.9.0';

$newLogs = '';
// The whole output ($newLogs is emptied when pushed to Bref Cloud)
Expand Down