Browse code

add function to tell us if version info comes from git

Joseph Weston authored on 15/10/2018 10:35:17
Showing 1 changed files
... ...
@@ -41,6 +41,10 @@ def get_static_version_info(version_file=STATIC_VERSION_FILE):
41 41
     return version_info
42 42
 
43 43
 
44
+def version_is_from_git(version_file=STATIC_VERSION_FILE):
45
+    return get_static_version_info(version_file)['version'] == '__use_git__'
46
+
47
+
44 48
 def pep440_format(version_info):
45 49
     release, dev, labels = version_info
46 50