diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-11-15 15:11:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-11-15 16:05:27 +0400 |
commit | 927dea436ee47e4dcabcde8eb4b167f0c32a08f2 (patch) | |
tree | 9e35618a41b1eb372ec9bb59d7d316909df9bb5c /build_files/scons/tools/Blender.py | |
parent | 825b0e8bc422174965ed8c0376d3d25b4f923394 (diff) |
Further tweaks to buildinfo
Summary:
Old idea with changes since previous release tag
didn't work good enough. In most of the cases tag
was done in a branch hence not actually reachable
from the master branch.
Now change since release is gone, and date of
the latest commit is used instead.
The date is displayed in format YYYY-MM-DD HH:mm
in the splash.
New bpy.app fields:
- build_commit_timestamp is an unix timestamp of
the commit blender was build from.
- build_commit_date is a date of that commit.
- build_commit_time is a time of that commit.
Reviewers: campbellbarton
Differential Revision: http://developer.blender.org/D5
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]), |