2022-07-08 02:27:06 +00:00
|
|
|
<?php
|
2022-07-14 02:04:31 +00:00
|
|
|
|
2022-08-02 01:32:46 +00:00
|
|
|
namespace Appwrite\CLI\Tasks;
|
2022-07-08 02:27:06 +00:00
|
|
|
|
|
|
|
|
use Utopia\App;
|
|
|
|
|
use Utopia\CLI\Console;
|
2022-07-13 06:26:22 +00:00
|
|
|
use Utopia\Platform\Action;
|
2022-07-08 02:27:06 +00:00
|
|
|
|
2022-07-14 02:04:31 +00:00
|
|
|
class Version extends Action
|
|
|
|
|
{
|
2022-08-02 01:58:36 +00:00
|
|
|
public static function getName(): string
|
|
|
|
|
{
|
|
|
|
|
return 'version';
|
|
|
|
|
}
|
2022-07-13 07:02:55 +00:00
|
|
|
|
2022-07-13 06:26:22 +00:00
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
$this
|
2022-07-08 02:27:06 +00:00
|
|
|
->desc('Get the server version')
|
2022-07-13 06:26:22 +00:00
|
|
|
->callback(function () {
|
2022-07-08 02:27:06 +00:00
|
|
|
Console::log(App::getEnv('_APP_VERSION', 'UNKNOWN'));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|