diff options
author | jannaerin <golden.janna@gmail.com> | 2021-09-28 16:16:40 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-09-28 17:08:47 +0000 |
commit | cabde0df1c9976c44067e4b10c3e4e96096fd83a (patch) | |
tree | 42d948efda83864f48a02b92db2b7415b125560d /src/mongo/SConscript | |
parent | 78ef9784e77a2411e8aa2b582bc80033f0f36228 (diff) | |
download | mongo-cabde0df1c9976c44067e4b10c3e4e96096fd83a.tar.gz |
SERVER-59918 Create mongoqd binary
Diffstat (limited to 'src/mongo/SConscript')
-rw-r--r-- | src/mongo/SConscript | 33 |
1 files changed, 2 insertions, 31 deletions
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', ], ) |