From e41954d0ccc69e1119350d325694f302b291dc4c Mon Sep 17 00:00:00 2001 From: James Brooks Date: Fri, 3 Feb 2017 21:44:46 +0000 Subject: [PATCH] Added cachet:version command --- app/Console/Commands/VersionCommand.php | 46 +++++++++++++++++++++++++ app/Console/Kernel.php | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 app/Console/Commands/VersionCommand.php diff --git a/app/Console/Commands/VersionCommand.php b/app/Console/Commands/VersionCommand.php new file mode 100644 index 00000000..b18209dd --- /dev/null +++ b/app/Console/Commands/VersionCommand.php @@ -0,0 +1,46 @@ + + */ +class VersionCommand extends Command +{ + /** + * The console command name. + * + * @var string + */ + protected $name = 'cachet:version'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Display the version of Cachet'; + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->info('Cachet '.CACHET_VERSION.' is installed ⚡'); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 78bd5b44..9a203840 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -15,6 +15,7 @@ use CachetHQ\Cachet\Console\Commands\BeaconCommand; use CachetHQ\Cachet\Console\Commands\DemoMetricPointSeederCommand; use CachetHQ\Cachet\Console\Commands\DemoSeederCommand; use CachetHQ\Cachet\Console\Commands\InstallCommand; +use CachetHQ\Cachet\Console\Commands\VersionCommand; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; @@ -37,6 +38,7 @@ class Kernel extends ConsoleKernel DemoMetricPointSeederCommand::class, DemoSeederCommand::class, InstallCommand::class, + VersionCommand::class, ]; /**