[Xfce4-commits] <midori:master> Only use git describe as version string if .git dir exists

Christian Dywan noreply at xfce.org
Wed Sep 1 20:48:01 CEST 2010


Updating branch refs/heads/master
         to 7820e209f852ddfac1d46f22b8f6e8ff4f6b0a45 (commit)
       from e25516a58b3fbf248cc48ad82261fef0e640c8d0 (commit)

commit 7820e209f852ddfac1d46f22b8f6e8ff4f6b0a45
Author: Natanael Copa <ncopa at alpinelinux.org>
Date:   Wed Sep 1 20:45:07 2010 +0200

    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 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/wscript b/wscript
index 05ee4ef..e567a0a 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
 



More information about the Xfce4-commits mailing list