summaryrefslogtreecommitdiff
path: root/src/mongo/util
diff options
context:
space:
mode:
authorXueruiFa <xuerui.fa@mongodb.com>2021-08-09 21:23:33 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-23 15:28:11 +0000
commit9214969b876f47c277623f7f6fe60bb13adcf7ad (patch)
treeab18abbca9154df7331726288efeff98ecdcff99 /src/mongo/util
parent1c458cebc23d20bf259d3774498b5080b7565ca1 (diff)
downloadmongo-9214969b876f47c277623f7f6fe60bb13adcf7ad.tar.gz
SERVER-50911: Generate YAML file containing latest git tag
Diffstat (limited to 'src/mongo/util')
-rw-r--r--src/mongo/util/version/SConscript16
-rw-r--r--src/mongo/util/version/mongo_version.yml.in1
2 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/util/version/SConscript b/src/mongo/util/version/SConscript
index da148ae99ff..8c705c9b402 100644
--- a/src/mongo/util/version/SConscript
+++ b/src/mongo/util/version/SConscript
@@ -23,3 +23,19 @@ generateReleases = env.Command(
)
env.Alias('generated-sources', generateReleases)
+
+generateMongoVersionFile = env.Substfile(
+ target=[
+ 'mongo_version.yml.in',
+ ],
+ SUBST_DICT=[
+ ('@mongo_version@', env['MONGO_VERSION']),
+ ]
+)
+
+env.AutoInstall(
+ target='$PREFIX_SHAREDIR/mongodb',
+ source=generateMongoVersionFile,
+ AIB_COMPONENT='dist-test',
+ AIB_ROLE='base',
+)
diff --git a/src/mongo/util/version/mongo_version.yml.in b/src/mongo/util/version/mongo_version.yml.in
new file mode 100644
index 00000000000..9f5a8cf6bcf
--- /dev/null
+++ b/src/mongo/util/version/mongo_version.yml.in
@@ -0,0 +1 @@
+mongo_version: @mongo_version@