git --git-dir=/path/to/project/.git --work-tree=/path/to/project describe --abbrev=0 --tags
returns release-11.5.5
I have in my Python 3 code to get the latest release :
gd = '--git-dir=' + os.path.join(BASE_DIR, '.git');
wt = '--work-tree=' + BASE_DIR;
latest_release = subprocess.check_output(["git", gd, wt, "describe", "--abbrev=0", "--tags"]).strip()
returns b'release-11.5.5' From where did the enclosing b'' come from ?