diff options
author | XueruiFa <xuerui.fa@mongodb.com> | 2021-08-09 21:23:33 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-23 15:28:11 +0000 |
commit | 9214969b876f47c277623f7f6fe60bb13adcf7ad (patch) | |
tree | ab18abbca9154df7331726288efeff98ecdcff99 /src/mongo/util | |
parent | 1c458cebc23d20bf259d3774498b5080b7565ca1 (diff) | |
download | mongo-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/SConscript | 16 | ||||
-rw-r--r-- | src/mongo/util/version/mongo_version.yml.in | 1 |
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@ |