From 673f68b07cca2ca7d47a3cec713432b8b2c58167 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 26 Jul 2023 07:30:44 +0200 Subject: [PATCH] A simple command that outputs the Firefly III version. --- app/Console/Commands/System/OutputVersion.php | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 app/Console/Commands/System/OutputVersion.php diff --git a/app/Console/Commands/System/OutputVersion.php b/app/Console/Commands/System/OutputVersion.php new file mode 100644 index 0000000000..c00b1cef50 --- /dev/null +++ b/app/Console/Commands/System/OutputVersion.php @@ -0,0 +1,50 @@ +. + */ + +namespace FireflyIII\Console\Commands\System; + +use Illuminate\Console\Command; + +class OutputVersion extends Command +{ + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'firefly-iii:output-version'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Outputs the Firefly III version'; + + /** + * Execute the console command. + */ + public function handle(): int + { + echo config('firefly.version'); + return 0; + } +}