summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2021-07-06 15:29:52 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-07-20 20:13:18 +0000
commit5eb50768263b16d34768772b08e0d8641e83aa80 (patch)
treed80866e635a34cc58c958cc93daa6f01238ecc0f /etc
parent83bc43d9656e4e298b0da87e65a955a1cb4ec37c (diff)
downloadmongo-5eb50768263b16d34768772b08e0d8641e83aa80.tar.gz
SERVER-58283 Add a variables file for configuring developer style MONGO_VERSION values
(cherry picked from commit dc0b308cfc2014e4f3b655aca7d296263c0592c9) (cherry picked from commit 522024f39b5bc1a4f5a7b49306d20b10bf87fe80) (cherry picked from commit 58cb09ed37fdcbf55b405d8fb17742bdd901e99d)
Diffstat (limited to 'etc')
-rw-r--r--etc/scons/developer_versions.vars13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/scons/developer_versions.vars b/etc/scons/developer_versions.vars
new file mode 100644
index 00000000000..3e34bccbc93
--- /dev/null
+++ b/etc/scons/developer_versions.vars
@@ -0,0 +1,13 @@
+def short_describe():
+ import os
+ import subprocess
+ with open(os.devnull, "r+") as devnull:
+ proc = subprocess.Popen("git describe --abbrev=0",
+ stdout=subprocess.PIPE,
+ stderr=devnull,
+ stdin=devnull,
+ shell=True)
+ return proc.communicate()[0].decode('utf-8').strip()[1:]
+
+MONGO_GIT_HASH="unknown"
+MONGO_VERSION=short_describe()