feat: introduce deploy command#1202
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1202 +/- ##
==========================================
+ Coverage 67.91% 68.29% +0.38%
==========================================
Files 233 233
Lines 14712 15200 +488
==========================================
+ Hits 9991 10381 +390
- Misses 4363 4459 +96
- Partials 358 360 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@hwbrzzl I don't have tests for this code since the core logic is not implemented. The idea is to do that in the next PR. Would you still like some form of tests in this PR? I'll have to delete whatever tests I merge here in the next PR since the next one will implement and have tests for the core logic... |
|
Thanks @cggonzal Let's create the related issue and sub-issues first to check what features should be implemented first. |
console/service_provider.go
Outdated
| console.NewKeyGenerateCommand(configFacade), | ||
| console.NewMakeCommand(), | ||
| console.NewBuildCommand(configFacade), | ||
| console.NewDeployCommand(configFacade), |
There was a problem hiding this comment.
Don't need to register it for now.
There was a problem hiding this comment.
Removed the registration. See latest commit.
|
|
||
| // Extend The console command extend. | ||
| func (r *DeployCommand) Extend() command.Extend { | ||
| return command.Extend{} |
There was a problem hiding this comment.
Some options can be added in a further PR.
There was a problem hiding this comment.
Added a TODO comment to do this in a later PR.
| // get all environment variables | ||
| app_name := r.config.Env("APP_NAME") | ||
| ip_address := r.config.Env("DEPLOY_IP_ADDRESS") | ||
| ssh_port := r.config.Env("DEPLOY_SSH_PORT") | ||
| ssh_user := r.config.Env("DEPLOY_SSH_USER") | ||
| ssh_key_path := r.config.Env("DEPLOY_SSH_KEY_PATH") | ||
| os := r.config.Env("DEPLOY_OS") | ||
| arch := r.config.Env("DEPLOY_ARCH") | ||
| static := r.config.Env("DEPLOY_STATIC") | ||
|
|
||
| // if any of the required environment variables are missing, prompt the user to enter them | ||
| if app_name == "" { |
There was a problem hiding this comment.
The initiate variables logic can be separated into an independent function in a further PR.
There was a problem hiding this comment.
Added a TODO comment to do this in a later PR.
There was a problem hiding this comment.
Thanks, and please modify app_name to appName in the next PR.
|
@hwbrzzl I've made changes based on your comments. Two of the comments will be addressed in a later PR once the core logic is working. Let me know if there should be other changes before merging this. |
📑 Description
As discussed here, this PR introduces the deploy command that can be used to deploy a Goravel app to a server with a command like:
This PR introduces the
deploycommand but does not implement the command. A later PR will implement the logic of the command. This PR was created so that the feature could be broken up into smaller pieces as was discussed.✅ Checks