Skip to content

Commit

Permalink
Add a command 'php artisan apiato' to get current apiato version (api…
Browse files Browse the repository at this point in the history
…ato#526)

Add a command 'php artisan apiato' to get current apiato version
  • Loading branch information
Mahmoudz authored Jan 21, 2020
2 parents 515c2e7 + f8f88cc commit 8921056
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 145 deletions.
143 changes: 0 additions & 143 deletions CHANGELOG.md

This file was deleted.

4 changes: 2 additions & 2 deletions app/Containers/Welcome/UI/CLI/Commands/SayWelcomeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SayWelcomeCommand extends ConsoleCommand
*
* @var string
*/
protected $description = 'Just saying Welcome.';
protected $description = 'Just saying welcome from a container.';

/**
* Create a new command instance.
Expand All @@ -43,6 +43,6 @@ public function __construct()
*/
public function handle()
{
echo "Welcome to apiato :)\n";
echo "Welcome to Apiato :)\n";
}
}
46 changes: 46 additions & 0 deletions app/Ship/core/Commands/GetApiatoVersionCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace Apiato\Core\Commands;

use Apiato\Core\Foundation\Apiato;
use App\Ship\Parents\Commands\ConsoleCommand;

/**
* Class GetApiatoVersionCommand
*
* @author Mahmoud Zalt <[email protected]>
*/
class GetApiatoVersionCommand extends ConsoleCommand
{

/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = "apiato";

/**
* The console command description.
*
* @var string
*/
protected $description = "Display the current Apiato version.";

/**
* GetApiatoVersionCommand constructor.
*/
public function __construct()
{
parent::__construct();
}

/**
* Handle the command
*/
public function handle()
{
$this->info(Apiato::VERSION);
}

}
7 changes: 7 additions & 0 deletions app/Ship/core/Foundation/Apiato.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ class Apiato

use CallableTrait;

/**
* The Apiato version.
*
* @var string
*/
const VERSION = '8.0.1';

/**
* Get the containers namespace value from the containers config file
*
Expand Down

0 comments on commit 8921056

Please sign in to comment.