|
@@ -80,6 +80,25 @@ class Builder implements Capable, Capability, EventSubscriberInterface, PluginIn
|
|
|
];
|
|
|
}
|
|
|
|
|
|
+ protected function showCommands() {
|
|
|
+ $capabilities = $this->getCapabilities();
|
|
|
+ if (empty($capabilities[CommandProvider::class])) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $providerClass = $capabilities[CommandProvider::class];
|
|
|
+
|
|
|
+ $provider = new $providerClass([
|
|
|
+ 'composer' => $this->composer,
|
|
|
+ 'io' => $io = $this->io,
|
|
|
+ 'plugin' => NULL,
|
|
|
+ ]);
|
|
|
+ $commands = $provider->getCommands();
|
|
|
+ $io->write("Available build commands:");
|
|
|
+ foreach ($commands as $command) {
|
|
|
+ $io->write("- " . $command->getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* Event callback: run build:settings on post-install|update only.
|
|
|
*
|
|
@@ -96,6 +115,11 @@ class Builder implements Capable, Capability, EventSubscriberInterface, PluginIn
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ if ($event->getIO()->isVerbose()) {
|
|
|
+ $this->showCommands();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|