From b2d3417559862a7808b1e20edf429f4e789b6633 Mon Sep 17 00:00:00 2001 From: Robert May Date: Tue, 27 Oct 2015 19:25:21 +0000 Subject: [PATCH] Fix build when $git_branch fails to be set correctly. --- source/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 2d9806c..271ed29 100755 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -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}")