Details
Description
Write a new variables file called "etc/scons/developer_versioning.vars" that sets MONGO_VERSION using the latest git tag and MONGO_GIT_HASH with some string constant. It may look something like this:
import os
|
import subprocess
|
|
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()
|