mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
build: fixed 'make dist' without configuring
this finds git inside samba_version.py thanks to Simo for noticing this problem Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Feb 23 07:55:28 CET 2011 on sn-devel-104
This commit is contained in:
parent
0a6e0edc04
commit
4f48a28c3c
@ -52,6 +52,10 @@ def bzr_version_summary(path):
|
||||
|
||||
def git_version_summary(path, env=None):
|
||||
# Get version from GIT
|
||||
if not 'GIT' in env and os.path.exists("/usr/bin/git"):
|
||||
# this is useful when doing make dist without configuring
|
||||
env.GIT = "/usr/bin/git"
|
||||
|
||||
if not 'GIT' in env:
|
||||
return ("GIT-UNKNOWN", {})
|
||||
|
||||
@ -74,7 +78,7 @@ def git_version_summary(path, env=None):
|
||||
ret = "GIT-" + fields["GIT_COMMIT_ABBREV"]
|
||||
|
||||
if env.GIT_LOCAL_CHANGES:
|
||||
clean = Utils.cmd_output('git diff HEAD | wc -l', silent=True).strip()
|
||||
clean = Utils.cmd_output('%s diff HEAD | wc -l' % env.GIT, silent=True).strip()
|
||||
if clean == "0":
|
||||
fields["COMMIT_IS_CLEAN"] = 1
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user