mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Hide version check on dev mode
This commit is contained in:
@@ -219,15 +219,14 @@ $cli
|
||||
Console::log('');
|
||||
$version = \json_decode(@\file_get_contents(App::getEnv('_APP_HOME', 'http://localhost').'/v1/health/version'), true);
|
||||
|
||||
if($version && isset($version['version'])) {
|
||||
if ($version && isset($version['version']) && App::isProduction()) {
|
||||
if(\version_compare($version['version'], App::getEnv('_APP_VERSION', 'UNKNOWN')) === 0) {
|
||||
Console::info('You are running the latest version of '.APP_NAME.'! 🥳');
|
||||
}
|
||||
else {
|
||||
Console::info('A new version ('.$version['version'].') is available! 🥳'."\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
Console::error('Failed to check for a newer version'."\n");
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
|
||||
Reference in New Issue
Block a user