summaryrefslogtreecommitdiff
path: root/kanboard
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-20 12:51:05 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-20 12:51:05 -0400
commit8d69c49da595c60dae51c77d48f397ab97fdf318 (patch)
tree7fba4edb18c5c4c161e76828d5847733aca8d27b /kanboard
parentcbf896e74e666f102f475787202d3402f229a919 (diff)
Manage plugins from the user interface and from the command line
Diffstat (limited to 'kanboard')
-rwxr-xr-xkanboard48
1 files changed, 31 insertions, 17 deletions
diff --git a/kanboard b/kanboard
index 6a51c937..49f3fe17 100755
--- a/kanboard
+++ b/kanboard
@@ -1,8 +1,9 @@
#!/usr/bin/env php
<?php
-require __DIR__.'/app/common.php';
-
+use Kanboard\Console\PluginInstallCommand;
+use Kanboard\Console\PluginUninstallCommand;
+use Kanboard\Console\PluginUpgradeCommand;
use Kanboard\Console\ResetPasswordCommand;
use Kanboard\Console\ResetTwoFactorCommand;
use Symfony\Component\Console\Application;
@@ -18,19 +19,32 @@ use Kanboard\Console\LocaleComparatorCommand;
use Kanboard\Console\TaskTriggerCommand;
use Kanboard\Console\CronjobCommand;
-$container['dispatcher']->dispatch('app.bootstrap', new Event);
-$application = new Application('Kanboard', APP_VERSION);
-$application->add(new TaskOverdueNotificationCommand($container));
-$application->add(new SubtaskExportCommand($container));
-$application->add(new TaskExportCommand($container));
-$application->add(new ProjectDailyStatsCalculationCommand($container));
-$application->add(new ProjectDailyColumnStatsExportCommand($container));
-$application->add(new TransitionExportCommand($container));
-$application->add(new LocaleSyncCommand($container));
-$application->add(new LocaleComparatorCommand($container));
-$application->add(new TaskTriggerCommand($container));
-$application->add(new CronjobCommand($container));
-$application->add(new ResetPasswordCommand($container));
-$application->add(new ResetTwoFactorCommand($container));
-$application->run();
+try {
+
+ require __DIR__.'/app/common.php';
+
+ $container['dispatcher']->dispatch('app.bootstrap', new Event);
+
+ $application = new Application('Kanboard', APP_VERSION);
+ $application->add(new TaskOverdueNotificationCommand($container));
+ $application->add(new SubtaskExportCommand($container));
+ $application->add(new TaskExportCommand($container));
+ $application->add(new ProjectDailyStatsCalculationCommand($container));
+ $application->add(new ProjectDailyColumnStatsExportCommand($container));
+ $application->add(new TransitionExportCommand($container));
+ $application->add(new LocaleSyncCommand($container));
+ $application->add(new LocaleComparatorCommand($container));
+ $application->add(new TaskTriggerCommand($container));
+ $application->add(new CronjobCommand($container));
+ $application->add(new ResetPasswordCommand($container));
+ $application->add(new ResetTwoFactorCommand($container));
+ $application->add(new PluginUpgradeCommand($container));
+ $application->add(new PluginInstallCommand($container));
+ $application->add(new PluginUninstallCommand($container));
+ $application->run();
+
+} catch (Exception $e) {
+ echo $e->getMessage().PHP_EOL;
+ exit(255);
+}