1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-15 17:51:06 +00:00

Skip version check if $DFLY_DEV_ENV is set (#928)

Signed-off-by: ashotland <ari@dragonflydb.io>
This commit is contained in:
ashotland 2023-03-12 00:08:35 +02:00 committed by GitHub
parent 011c086e10
commit 85f0f3cbb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -193,10 +193,19 @@ struct VersionMonitor {
};
void VersionMonitor::Run(ProactorPool* proactor_pool) {
// Don't run in dev environment - i.e. where we don't build with
// real version number
if (!GetFlag(FLAGS_version_check) || kGitTag[0] != 'v' || strchr(kGitTag, '-') != NULL)
// Avoid running dev environments.
bool is_dev_env = false;
const char* env_var = getenv("DFLY_DEV_ENV");
if (env_var) {
LOG(WARNING) << "Running in dev environment (DFLY_DEV_ENV is set) - version monitoring is "
"disabled";
is_dev_env = true;
}
if (!GetFlag(FLAGS_version_check) || is_dev_env ||
// not a production release tag.
kGitTag[0] != 'v' || strchr(kGitTag, '-') != NULL) {
return;
}
SSL_CTX* ssl_ctx = TlsClient::CreateSslContext();
if (!ssl_ctx) {