diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-11-12 17:18:30 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-11-12 17:42:13 +0000 |
commit | 45af495695a83636e79a810e212542d7c292a9ac (patch) | |
tree | f62da38c52010251cbe2b1cdd4ca4805db233740 /buildtools | |
parent | d9a0a18ddabe9b91e73cc8bf1582af46d208ff27 (diff) | |
download | samba-45af495695a83636e79a810e212542d7c292a9ac.tar.gz samba-45af495695a83636e79a810e212542d7c292a9ac.tar.bz2 samba-45af495695a83636e79a810e212542d7c292a9ac.zip |
samba_version: Cope with building snapshots in directories without git checkout.
Error out when run in a git checkout in which git fails.
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_version.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py index bddf917ba2..bbd6439efc 100644 --- a/buildtools/wafsamba/samba_version.py +++ b/buildtools/wafsamba/samba_version.py @@ -1,3 +1,4 @@ +import os import Utils def git_version_summary(have_git): @@ -90,7 +91,11 @@ also accepted as dictionary entries here SAMBA_VERSION_STRING += ("rc%u" % self.RC_RELEASE) if self.IS_SNAPSHOT: - suffix, self.vcs_fields = git_version_summary(have_git) + if os.path.exists(".git"): + suffix, self.vcs_fields = git_version_summary(have_git) + else: + suffix = "UNKNOWN" + self.vcs_fields = {} SAMBA_VERSION_STRING += "-" + suffix else: self.vcs_fields = {} |