1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

samba_version: Cope with building snapshots in directories without git checkout.

Error out when run in a git checkout in which git fails.
This commit is contained in:
Jelmer Vernooij 2010-11-12 17:18:30 +01:00
parent d9a0a18dda
commit 45af495695

View File

@ -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 = {}