Fix build when $git_branch fails to be set correctly.

master
Robert May 2015-10-27 19:25:21 +00:00
parent 2b35c969cd
commit b2d3417559
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ set(YOTTA_AUTO_MICROBIT-DAL_CPP_FILES
execute_process(WORKING_DIRECTORY "../../yotta_modules/${PROJECT_NAME}" COMMAND "git" "log" "--pretty=format:%h" "-n" "1" OUTPUT_VARIABLE git_hash)
execute_process(WORKING_DIRECTORY "../../yotta_modules/${PROJECT_NAME}" COMMAND "git" "rev-parse" "--abbrev-ref" "HEAD" OUTPUT_VARIABLE git_branch OUTPUT_STRIP_TRAILING_WHITESPACE)
if (${git_branch} STREQUAL "master")
if ("${git_branch}" STREQUAL "master")
set(MICROBIT_DAL_VERSION_STRING "${YOTTA_MICROBIT_DAL_VERSION_STRING}")
else()
set(MICROBIT_DAL_VERSION_STRING "${YOTTA_MICROBIT_DAL_VERSION_STRING}-${git_branch}-g${git_hash}")