From: Natanael Copa Date: Wed, 1 Sep 2010 18:45:07 +0000 (+0200) Subject: Only use git describe as version string if .git dir exists X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7820e209f852ddfac1d46f22b8f6e8ff4f6b0a45;p=midori 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. --- diff --git a/wscript b/wscript index 05ee4efd..e567a0a6 100644 --- a/wscript +++ b/wscript @@ -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