From 7820e209f852ddfac1d46f22b8f6e8ff4f6b0a45 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 1 Sep 2010 20:45:07 +0200 Subject: [PATCH] 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. --- wscript | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5