Show hash from latest pushed commit in buildinfo

Before this hash of latest local commit was used,
which is not so much useful since nobody can access
that commit hash.
This commit is contained in:
Sergey Sharybin 2013-11-25 16:25:35 +06:00
parent b2c1bb74b2
commit 551f3eef74
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ if(EXISTS ${SOURCE_DIR}/.git/)
# The FindSubversion.cmake module is part of the standard distribution
include(FindGit)
if(GIT_FOUND)
execute_process(COMMAND git rev-parse --short HEAD
execute_process(COMMAND git rev-parse --short @{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)

View File

@ -419,7 +419,7 @@ def buildinfo(lenv, build_type):
build_commit_timestamp = '0'
build_branch = 'unknown'
else:
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
build_hash = os.popen('git rev-parse --short @{u}').read().strip()
build_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
# ## Check for local modifications