Use 8 characters for SYNERGY_REVISION

This commit is contained in:
Andrew Nelless 2017-05-22 14:30:12 +01:00 committed by GitHub
parent 9d79f9bee4
commit ca830f267a
1 changed files with 4 additions and 4 deletions

View File

@ -75,7 +75,7 @@ endif()
if (NOT DEFINED SYNERGY_REVISION) if (NOT DEFINED SYNERGY_REVISION)
if (DEFINED ENV{GIT_COMMIT}) if (DEFINED ENV{GIT_COMMIT})
string (SUBSTRING $ENV{GIT_COMMIT} 0 7 SYNERGY_REVISION) string (SUBSTRING $ENV{GIT_COMMIT} 0 8 SYNERGY_REVISION)
elseif (SYNERGY_VERSION_STAGE STREQUAL "git") elseif (SYNERGY_VERSION_STAGE STREQUAL "git")
execute_process ( execute_process (
COMMAND git rev-parse --short HEAD COMMAND git rev-parse --short HEAD
@ -86,9 +86,9 @@ if (NOT DEFINED SYNERGY_REVISION)
endif() endif()
endif() endif()
#if (NOT "${SYNERGY_REVISION}" MATCHES "[a-f0-9]{8}") if (NOT SYNERGY_REVISION MATCHES "[a-f0-9]{8}")
# message (FATAL_ERROR "SYNERGY_VERSION='${SYNERGY_REVISION}' is an invalid git shorthash") message (FATAL_ERROR "SYNERGY_VERSION='${SYNERGY_REVISION}' is invalid")
#endif() endif()
string (TIMESTAMP SYNERGY_BUILD_DATE "%Y%m%d" UTC) string (TIMESTAMP SYNERGY_BUILD_DATE "%Y%m%d" UTC)
if (DEFINED ENV{BUILDS_TODAY}) if (DEFINED ENV{BUILDS_TODAY})