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:
parent
e25516a58b
commit
7820e209f8
1 changed files with 4 additions and 3 deletions
7
wscript
7
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue