appwrite/src/Appwrite/Task/Version.php

23 lines
540 B
PHP
Raw Normal View History

2022-07-08 02:27:06 +00:00
<?php
namespace Appwrite\Task;
use Utopia\App;
use Appwrite\Task\Task;
use Utopia\CLI\Task as CLITask;
use Utopia\CLI\Console;
class Version implements Task {
protected static CLITask $task;
public static function getTask(): CLITask {
$version = new CLITask('version');
$version
->desc('Get the server version')
->action(function () {
Console::log(App::getEnv('_APP_VERSION', 'UNKNOWN'));
});
self::$task = $version;
return self::$task;
}
}