]> spindle.queued.net Git - midori/commitdiff
Only use git describe as version string if .git dir exists
authorNatanael Copa <ncopa@alpinelinux.org>
Wed, 1 Sep 2010 18:45:07 +0000 (20:45 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 1 Sep 2010 18:47:01 +0000 (20:47 +0200)
We don't want to pick up the git version string on distros
which have build scripts in git.

wscript

diff --git a/wscript b/wscript
index 05ee4efd8e997a531a33e572728a388a9fb62565..e567a0a67885f0761a6ec49af9a74226ea4fc85d 100644 (file)
--- 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