Skip to content

Commit

Permalink
Merge pull request #36 from fourkitchens/feature/v2-env-management-im…
Browse files Browse the repository at this point in the history
…provements

Env management improvements
  • Loading branch information
rigoucr authored Aug 1, 2024
2 parents af389a7 + 22393f9 commit bde8fdb
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Example:

alias: `stop`

- `env:poweroff`: Stops the local Docker and the proxy based env (lando, ddev).

alias: `poweroff`

- `local:build`: Builds your Drupal Site from the scratch.

Alias: `local-build, build`
Expand Down
5 changes: 3 additions & 2 deletions src/Robo/Plugin/Commands/DrushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class DrushCommand extends Tasks {
* Usage Example: fire drush -- uli
*
* @command local:drush
* @aliases drush
* @usage -- uli
* @aliases d, drush
* @usage -- d uli
*
* @param $args drush you would like to execute.
*/
Expand All @@ -28,4 +28,5 @@ public function drush(ConsoleIO $io, array $args) {
$tasks->addTask($this->taskExec($env . ' drush')->args($args));
return $tasks;
}

}
28 changes: 28 additions & 0 deletions src/Robo/Plugin/Commands/EnvPowerOffCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Fire\Robo\Plugin\Commands;

use Robo\Symfony\ConsoleIO;
use Fire\Robo\Plugin\Commands\FireCommandBase;
use Robo\Robo;

/**
* Provides a command to Power Off your local env.
*/
class EnvPowerOffCommand extends FireCommandBase {

/**
* Power Off the local Docker based env (lando, ddev);
*
* Usage Example: fire poweroff
*
* @command env:poweroff
* @aliases po, poweroff
*
*/
public function envPowerOff(ConsoleIO $io) {
$env = Robo::config()->get('local_environment');
return $this->taskExec($env . ' poweroff')->printOutput(TRUE)->run();
}

}
3 changes: 2 additions & 1 deletion src/Robo/Plugin/Commands/EnvStartCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EnvStartCommand extends FireCommandBase {
/**
* Starts the local Docker based env (lando, ddev);
*
* Usage Example: fire build-php
* Usage Example: fire start
*
* @command env:start
* @aliases start
Expand All @@ -24,4 +24,5 @@ public function envStart(ConsoleIO $io) {
$env = Robo::config()->get('local_environment');
return $this->taskExec($env . ' start')->printOutput(TRUE)->run();
}

}
3 changes: 2 additions & 1 deletion src/Robo/Plugin/Commands/EnvStopCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EnvStopCommand extends FireCommandBase {
/**
* Stops the local Docker based env (lando, ddev);
*
* Usage Example: fire build-php
* Usage Example: fire stop
*
* @command env:stop
* @aliases stop
Expand All @@ -24,4 +24,5 @@ public function envStop(ConsoleIO $io) {
$env = Robo::config()->get('local_environment');
return $this->taskExec($env . ' stop')->printOutput(TRUE)->run();
}

}

0 comments on commit bde8fdb

Please sign in to comment.