diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2020-03-06 15:25:57 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-10 21:57:42 +0000 |
commit | 157f1221f6e2d896fb5968714d84b3da52eab504 (patch) | |
tree | 1f89050f5875e539e1cfd5c7c1cc592babc14083 /site_scons/mongo | |
parent | 8393d898d70421a944adfb39835ec82fe3e3b860 (diff) | |
download | mongo-157f1221f6e2d896fb5968714d84b3da52eab504.tar.gz |
SERVER-46763 structure the VersionInfoInterface tuples
Diffstat (limited to 'site_scons/mongo')
-rw-r--r-- | site_scons/mongo/generators.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/site_scons/mongo/generators.py b/site_scons/mongo/generators.py index b60c1fa3b00..e2b401a5eae 100644 --- a/site_scons/mongo/generators.py +++ b/site_scons/mongo/generators.py @@ -4,17 +4,17 @@ import hashlib # Default and alternative generator definitions go here. -# This is the tuple that will be returned by the buildInfo command and +# This is the key/value mapping that will be returned by the buildInfo command and # printed by the --version command-line option to mongod. -# Each tuple consists of: -# key (string) -# value (string) -# should be included in buildInfo output (bool) -# should be included in --version output (bool) -# The values will be passed through env.subst, so you can use any SCons variables you +# Each mapped value is in turn a dict consisting of: +# key: <string> +# value: <string> +# inBuildInfo: <bool> : should it be included in buildInfo output +# inVersion: <bool> : should it be included in --version output +# The `value` field will be passed through env.subst, so you can use any SCons variables you # want to define them. def default_buildinfo_environment_data(): - return ( + data = ( ( 'distmod', '$MONGO_DISTMOD', @@ -76,12 +76,16 @@ def default_buildinfo_environment_data(): False, ), ) + return { + k:{'key': k, 'value': v, 'inBuildInfo': ibi, 'inVersion': iv} + for k, v, ibi, iv in data + } # If you want buildInfo and --version to be relatively empty, set # MONGO_BUILDINFO_ENVIRONMENT_DATA = empty_buildinfo_environment_data() def empty_buildinfo_environment_data(): - return () + return {} def default_variant_dir_generator(target, source, env, for_signature): |