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, ]; /**