summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_version.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/wafsamba/samba_version.py')
-rw-r--r--buildtools/wafsamba/samba_version.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 4f99b2c087..5804afbe4b 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -1,5 +1,6 @@
import os
import Utils
+import samba_utils
def bzr_version_summary(path):
try:
@@ -246,3 +247,15 @@ def samba_version_file(version_file, path, env=None):
raise
return SambaVersion(version_dict, path, env=env)
+
+
+
+def load_version(env=None):
+ '''load samba versions either from ./VERSION or git
+ return a version object for detailed breakdown'''
+ if not env:
+ env = samba_utils.LOAD_ENVIRONMENT()
+
+ version = samba_version_file("./VERSION", "..", env)
+ Utils.g_module.VERSION = version.STRING
+ return version