Add option to install developer plugins from the october:install command (#2974)

Credit to @filipac. Initially requested in https://github.com/octobercms/october/pull/2694
This commit is contained in:
Filip Iulian Pacurar 2018-11-23 08:24:45 +02:00 committed by Luke Towers
parent e481206b49
commit dcd309ffb0

View File

@ -74,6 +74,7 @@ class OctoberInstall extends Command
if ($this->confirm('Configure advanced options?', false)) {
$this->setupEncryptionKey();
$this->setupAdvancedValues();
$this->askToInstallPlugins();
}
else {
$this->setupEncryptionKey(true);
@ -118,6 +119,23 @@ class OctoberInstall extends Command
$this->writeToConfig('app', ['debug' => $debug]);
}
protected function askToInstallPlugins() {
if ($this->confirm('Install the October.Drivers plugin?', false)) {
$this->output->writeln('<info>Installing plugin October.Drivers</info>');
$this->callSilent('plugin:install', [
'name' => 'October.Drivers'
]);
$this->output->writeln('<info>October.Drivers installed successfully.</info>');
}
if($this->confirm('Install the Rainlab.Builder plugin?', false)) {
$this->output->writeln('<info>Installing plugin Rainlab.Builder</info>');
$this->callSilent('plugin:install', [
'name' => 'Rainlab.Builder'
]);
$this->output->writeln('<info>Rainlab.Builder installed successfully.</info>');
}
}
//
// Encryption key
//