summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2021-09-21 14:28:23 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-27 20:34:46 +0000
commitc8fdce8af95e50b18d1cc821c37ec46adb24851a (patch)
tree7eafe830c92e5b29953a81b5121a5739b9765da9
parent32f1ceb54a6cdd8beccf7416faab09fe0d79549d (diff)
downloadmongo-c8fdce8af95e50b18d1cc821c37ec46adb24851a.tar.gz
SERVER-59918 Create mongoqd binary
-rw-r--r--SConstruct31
-rw-r--r--src/mongo/SConscript33
-rw-r--r--src/mongo/db/SConscript2
-rw-r--r--src/mongo/shell/SConscript1
4 files changed, 36 insertions, 31 deletions
diff --git a/SConstruct b/SConstruct
index b08b3fcd37b..05f2a8e6bc6 100644
--- a/SConstruct
+++ b/SConstruct
@@ -5084,6 +5084,35 @@ if get_option('legacy-tarball') == 'true':
module_sconscripts = moduleconfig.get_module_sconscripts(mongo_modules)
+# This generates a numeric representation of the version string so that
+# you can easily compare versions of MongoDB without having to parse
+# the version string.
+#
+# Examples:
+# 5.1.1-123 => ['5', '1', '1', '123', None, None] => [5, 1, 2, -100]
+# 5.1.1-rc2 => ['5', '1', '1', 'rc2', 'rc', '2'] => [5, 1, 1, -23]
+# 5.1.1-rc2-123 => ['5', '1', '1', 'rc2-123', 'rc', '2'] => [5, 1, 1, -23]
+# 5.1.0-alpha-123 => ['5', '1', '0', 'alpha-123', 'alpha', ''] => [5, 1, 0, -50]
+# 5.1.0-alpha1-123 => ['5', '1', '0', 'alpha1-123', 'alpha', '1'] => [5, 1, 0, -49]
+# 5.1.1 => ['5', '1', '1', '', None, None] => [5, 1, 1, 0]
+
+version_parts = [ x for x in re.match(r'^(\d+)\.(\d+)\.(\d+)-?((?:(rc|alpha)(\d?))?.*)?',
+ env['MONGO_VERSION']).groups() ]
+version_extra = version_parts[3] if version_parts[3] else ""
+if version_parts[4] == 'rc':
+ version_parts[3] = int(version_parts[5]) + -25
+elif version_parts[4] == 'alpha':
+ if version_parts[5] == '':
+ version_parts[3] = -50
+ else:
+ version_parts[3] = int(version_parts[5]) + -50
+elif version_parts[3]:
+ version_parts[2] = int(version_parts[2]) + 1
+ version_parts[3] = -100
+else:
+ version_parts[3] = 0
+version_parts = [ int(x) for x in version_parts[:4]]
+
# The following symbols are exported for use in subordinate SConscript files.
# Ideally, the SConscript files would be purely declarative. They would only
# import build environment objects, and would contain few or no conditional
@@ -5109,6 +5138,8 @@ Export([
'use_system_version_of_library',
'use_vendored_libunwind',
'usemozjs',
+ 'version_extra',
+ 'version_parts',
'wiredtiger',
])
diff --git a/src/mongo/SConscript b/src/mongo/SConscript
index ba404f5467e..8a7e3af3a01 100644
--- a/src/mongo/SConscript
+++ b/src/mongo/SConscript
@@ -7,41 +7,14 @@ Import([
"has_option",
"get_option",
"use_libunwind",
+ "version_extra",
+ "version_parts",
])
env = env.Clone()
env.InjectMongoIncludePaths()
-# This generates a numeric representation of the version string so that
-# you can easily compare versions of MongoDB without having to parse
-# the version string.
-#
-# Examples:
-# 5.1.1-123 => ['5', '1', '1', '123', None, None] => [5, 1, 2, -100]
-# 5.1.1-rc2 => ['5', '1', '1', 'rc2', 'rc', '2'] => [5, 1, 1, -23]
-# 5.1.1-rc2-123 => ['5', '1', '1', 'rc2-123', 'rc', '2'] => [5, 1, 1, -23]
-# 5.1.0-alpha-123 => ['5', '1', '0', 'alpha-123', 'alpha', ''] => [5, 1, 0, -50]
-# 5.1.0-alpha1-123 => ['5', '1', '0', 'alpha1-123', 'alpha', '1'] => [5, 1, 0, -49]
-# 5.1.1 => ['5', '1', '1', '', None, None] => [5, 1, 1, 0]
-
-version_parts = [ x for x in re.match(r'^(\d+)\.(\d+)\.(\d+)-?((?:(rc|alpha)(\d?))?.*)?',
- env['MONGO_VERSION']).groups() ]
-version_extra = version_parts[3] if version_parts[3] else ""
-if version_parts[4] == 'rc':
- version_parts[3] = int(version_parts[5]) + -25
-elif version_parts[4] == 'alpha':
- if version_parts[5] == '':
- version_parts[3] = -50
- else:
- version_parts[3] = int(version_parts[5]) + -50
-elif version_parts[3]:
- version_parts[2] = int(version_parts[2]) + 1
- version_parts[3] = -100
-else:
- version_parts[3] = 0
-version_parts = [ int(x) for x in version_parts[:4]]
-
env.AppendUnique(
FORCEINCLUDES=[
'mongo/platform/basic.h',
@@ -75,8 +48,6 @@ env.SConscript(
],
exports=[
'env',
- 'version_extra',
- 'version_parts',
],
)
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index f83373e8d84..c94a8f06836 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -2315,6 +2315,8 @@ env.Program(
"default",
"dist",
"dist-test",
+ "serverless",
+ "serverless-test",
"servers",
"integration-tests",
],
diff --git a/src/mongo/shell/SConscript b/src/mongo/shell/SConscript
index 03317db08f3..5e64d6ce24e 100644
--- a/src/mongo/shell/SConscript
+++ b/src/mongo/shell/SConscript
@@ -346,6 +346,7 @@ if not has_option('noshell') and usemozjs:
"default",
"dist",
"dist-test",
+ "serverless-test",
"shell",
"integration-tests",
],