Only use git describe as version string if .git dir exists

We don't want to pick up the git version string on distros
which have build scripts in git.
This commit is contained in:
Natanael Copa 2010-09-01 20:45:07 +02:00 committed by Christian Dywan
parent e25516a58b
commit 7820e209f8

View file

@ -35,6 +35,7 @@ APPNAME = 'midori'
VERSION = str (major) + '.' + str (minor) + '.' + str (micro)
try:
if os.path.isdir ('.git'):
git = Utils.cmd_output (['git', 'describe'], silent=True)
if git:
VERSION = git.strip ()