diff options
author | Andrew Morrow <acm@mongodb.com> | 2016-08-12 15:06:02 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2016-08-15 18:36:28 -0400 |
commit | dacf1667d1e650b4854ad33738b63ff379faec92 (patch) | |
tree | 63e0247eb0291604c4e76f254ce2606edd9925b8 /src/mongo/shell | |
parent | 2114a082f97dbe4263b10b836aca3332af5caca2 (diff) | |
download | mongo-dacf1667d1e650b4854ad33738b63ff379faec92.tar.gz |
SERVER-25402 Fewer binaries depend on interpolated version info
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/dbshell.cpp | 2 | ||||
-rw-r--r-- | src/mongo/shell/shell_options.cpp | 5 | ||||
-rw-r--r-- | src/mongo/shell/shell_utils.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp index 66b03166ce6..97f80abeb5e 100644 --- a/src/mongo/shell/dbshell.cpp +++ b/src/mongo/shell/dbshell.cpp @@ -600,7 +600,7 @@ int _main(int argc, char* argv[], char** envp) { } if (!mongo::serverGlobalParams.quiet) - cout << mongoShellVersion() << endl; + cout << mongoShellVersion(VersionInfoInterface::instance()) << endl; mongo::StartupTest::runTests(); diff --git a/src/mongo/shell/shell_options.cpp b/src/mongo/shell/shell_options.cpp index 49037e6e12d..1b378836c35 100644 --- a/src/mongo/shell/shell_options.cpp +++ b/src/mongo/shell/shell_options.cpp @@ -218,13 +218,14 @@ std::string getMongoShellHelp(StringData name, const moe::OptionSection& options bool handlePreValidationMongoShellOptions(const moe::Environment& params, const std::vector<std::string>& args) { + auto&& vii = VersionInfoInterface::instance(); if (params.count("version") || params.count("help")) { setPlainConsoleLogger(); - log() << mongoShellVersion(); + log() << mongoShellVersion(vii); if (params.count("help")) { log() << getMongoShellHelp(args[0], moe::startupOptions); } else { - printBuildInfo(); + vii.logBuildInfo(); } return false; } diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp index e4edd8d9391..1e79ab36f0a 100644 --- a/src/mongo/shell/shell_utils.cpp +++ b/src/mongo/shell/shell_utils.cpp @@ -174,7 +174,7 @@ BSONObj isAddressSanitizerActive(const BSONObj& a, void* data) { BSONObj getBuildInfo(const BSONObj& a, void* data) { uassert(16822, "getBuildInfo accepts no arguments", a.nFields() == 0); BSONObjBuilder b; - appendBuildInfo(b); + VersionInfoInterface::instance().appendBuildInfo(&b); return BSON("" << b.done()); } |