Переход к HEAD, если не указан параметр GIT_TAG

This commit is contained in:
Andrei Astafev 2023-08-01 11:46:51 +03:00
parent 0c9573d005
commit f22913db9d

View File

@ -61,8 +61,13 @@ function(myx_download_content NAME)
execute_process(COMMAND ${GIT_EXECUTABLE} fetch
WORKING_DIRECTORY ${ARG_DOWNLOAD_DIR}/${NAME})
endif()
if(ARG_GIT_TAG)
execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${ARG_GIT_TAG}
WORKING_DIRECTORY ${ARG_DOWNLOAD_DIR}/${NAME})
else()
execute_process(COMMAND ${GIT_EXECUTABLE} pull
WORKING_DIRECTORY ${ARG_DOWNLOAD_DIR}/${NAME})
endif()
endif()
if(NOT CMAKE_SCRIPT_MODE_FILE)