2022-07-08 02:27:06 +00:00
|
|
|
<?php
|
2022-07-14 02:04:31 +00:00
|
|
|
|
2022-11-14 10:01:41 +00:00
|
|
|
namespace Appwrite\Platform\Tasks;
|
2022-07-08 02:27:06 +00:00
|
|
|
|
|
|
|
|
use Utopia\CLI\Console;
|
2022-07-13 06:26:22 +00:00
|
|
|
use Utopia\Platform\Action;
|
2024-04-01 11:02:47 +00:00
|
|
|
use Utopia\System\System;
|
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 () {
|
2024-04-01 11:02:47 +00:00
|
|
|
Console::log(System::getEnv('_APP_VERSION', 'UNKNOWN'));
|
2022-07-08 02:27:06 +00:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|