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,9 +35,10 @@ APPNAME = 'midori'
VERSION = str (major) + '.' + str (minor) + '.' + str (micro)
try:
git = Utils.cmd_output (['git', 'describe'], silent=True)
if git:
VERSION = git.strip ()
if os.path.isdir ('.git'):
git = Utils.cmd_output (['git', 'describe'], silent=True)
if git:
VERSION = git.strip ()
except:
pass