[Bf-blender-cvs] [1e10e4e] master: Fix error when getting the commit time fails
Campbell Barton
noreply at git.blender.org
Sun Jul 19 01:59:10 CEST 2015
Commit: 1e10e4e2e319ca764d49bb625574e01cd643288b
Author: Campbell Barton
Date: Sun Jul 19 09:51:49 2015 +1000
Branches: master
https://developer.blender.org/rB1e10e4e2e319ca764d49bb625574e01cd643288b
Fix error when getting the commit time fails
While this should work, allow the build to succeed if for some reason the command fails.
===================================================================
M build_files/cmake/buildinfo.cmake
===================================================================
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake
index 74c1f8f..756928a 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -97,6 +97,10 @@ if(EXISTS ${SOURCE_DIR}/.git)
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
+ # May fail in rare cases
+ if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
+ set(MY_WC_COMMIT_TIMESTAMP 0)
+ endif()
# Update GIT index before getting dirty files
execute_process(COMMAND git update-index -q --refresh
More information about the Bf-blender-cvs
mailing list