Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add command to deploy in local and give parameters to serverless invoke #9

Closed
wants to merge 2 commits into from
Closed

add command to deploy in local and give parameters to serverless invoke #9

wants to merge 2 commits into from

Conversation

Fabex
Copy link
Contributor

@Fabex Fabex commented May 25, 2018

In order to deploy on local machine with serveless I need to give some paremeters to the invoke function

bref Outdated
foreach ($buildHooks as $buildHook) {
$io->writeln('Running ' . $buildHook);
$commandRunner->run('cd .bref/output && ' . $buildHook);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! If I'm not mistaken everything above this is duplicated from the deploy command? Maybe that code could be shared instead, moved to a class maybe? I'm thinking a generate() method in a src/Console/Deployer class for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are right, it's a big duplication of deploy command. I would just propose you this feature in a simple way to saw if it's was a good idea.
I will refacto this and send you a new commit

bref Outdated
@@ -52,6 +52,104 @@ $app->command('init', function (SymfonyStyle $io) {
]);
});

$app->command('local [data]', function(?string $data, SymfonyStyle $io) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment above this line? Something that says something like "Runs the lambda locally".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok no problem

@mnapoli
Copy link
Member

mnapoli commented Jun 2, 2018

Thanks, I have built upon this PR (the code wasn't working) and opened #11. I have kept your commit, I'll be closing this one and merging #11.

@mnapoli mnapoli closed this Jun 2, 2018
brefphp-bot pushed a commit to brefphp-bot/bref that referenced this pull request Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants