diff --git a/app/Console/VersionCommand.php b/app/Console/VersionCommand.php new file mode 100644 index 000000000..678cc2eea --- /dev/null +++ b/app/Console/VersionCommand.php @@ -0,0 +1,28 @@ +setName('version') + ->setDescription('Display Kanboard version') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $output->writeln(APP_VERSION); + } +} diff --git a/app/ServiceProvider/CommandProvider.php b/app/ServiceProvider/CommandProvider.php index f17ba3527..b31162b8a 100644 --- a/app/ServiceProvider/CommandProvider.php +++ b/app/ServiceProvider/CommandProvider.php @@ -20,6 +20,7 @@ use Kanboard\Console\TaskExportCommand; use Kanboard\Console\TaskOverdueNotificationCommand; use Kanboard\Console\TaskTriggerCommand; use Kanboard\Console\TransitionExportCommand; +use Kanboard\Console\VersionCommand; use Kanboard\Console\WorkerCommand; use Pimple\Container; use Pimple\ServiceProviderInterface; @@ -61,6 +62,7 @@ class CommandProvider implements ServiceProviderInterface $application->add(new PluginUninstallCommand($container)); $application->add(new DatabaseMigrationCommand($container)); $application->add(new DatabaseVersionCommand($container)); + $application->add(new VersionCommand($container)); $container['cli'] = $application; return $container; diff --git a/doc/en_US/cli.markdown b/doc/en_US/cli.markdown index b7d607054..9ee8ae625 100644 --- a/doc/en_US/cli.markdown +++ b/doc/en_US/cli.markdown @@ -32,6 +32,7 @@ Available commands: help Displays help for a command job Execute individual job (read payload from stdin) list Lists commands + version Display Kanboard version worker Execute queue worker db db:migrate Execute SQL migrations