diff options
Diffstat (limited to 'build_files/scons/tools/Blender.py')
-rw-r--r-- | build_files/scons/tools/Blender.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 06cc6b7f00a..8715c2367e4 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -411,18 +411,9 @@ def buildinfo(lenv, build_type): build_date = time.strftime ("%Y-%m-%d") build_time = time.strftime ("%H:%M:%S") if os.path.isdir(os.path.abspath('.git')): - latest_version_tag = os.popen('git describe --match "v[0-9]*" --abbrev=0').read().strip() - if latest_version_tag: - build_change = os.popen('git rev-list HEAD ' + latest_version_tag + ' --count').read().strip() - else: - build_change = os.popen('git rev-list HEAD --count').read().strip() - + build_commit_timestamp = os.popen('git log -1 --format=%ct').read().strip() build_hash = os.popen('git rev-parse --short HEAD').read().strip() build_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip() - elif os.path.isdir(os.path.abspath('.svn')): - build_hash = '' - build_change = os.popen('svnversion').read()[:-1] # remove \n - build_branch = '' else: build_hash = '' build_change = 'unknown' @@ -445,7 +436,7 @@ def buildinfo(lenv, build_type): 'BUILD_DATE=\\"%s\\"'%(build_date), 'BUILD_TYPE=\\"%s\\"'%(build_type), 'BUILD_HASH=\\"%s\\"'%(build_hash), - 'BUILD_CHANGE=\\"%s\\"'%(build_change), + 'BUILD_COMMIT_TIMESTAMP=%s'%(build_commit_timestamp), 'BUILD_BRANCH=\\"%s\\"'%(build_branch), 'WITH_BUILDINFO', 'BUILD_PLATFORM=\\"%s:%s\\"'%(platform.system(), platform.architecture()[0]), |