mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-22 04:59:34 +01:00
14 lines
398 B
Plaintext
14 lines
398 B
Plaintext
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()
|