Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-11-28 00:25:09 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-11-28 00:25:09 +0400
commitaf7a2a3b6a08bdbe99d295e593e770af165eb0e6 (patch)
treea5ba7a4ebd45ba59ac063d8e8e15c30d4fce3312 /build_files/cmake/buildinfo.cmake
parent1d2c4357d5faf7417997291efcebcb4cb72791c3 (diff)
Fix buildinfo hash for cases there's no upstream set for the branch
Diffstat (limited to 'build_files/cmake/buildinfo.cmake')
-rw-r--r--build_files/cmake/buildinfo.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake
index 9d315c2518f..c31a7cfacb0 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -19,6 +19,15 @@ if(EXISTS ${SOURCE_DIR}/.git)
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if (MY_WC_HASH STREQUAL "")
+ # Local branch, not set to upstream.
+ # Well, let's use HEAD for now
+ execute_process(COMMAND git rev-parse --short HEAD
+ WORKING_DIRECTORY ${SOURCE_DIR}
+ OUTPUT_VARIABLE MY_WC_HASH
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ endif()
+
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_BRANCH