Skip to content
Snippets Groups Projects
Commit 3358e042 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

Merge pull request #46 in ASAPO/asapo from...

Merge pull request #46 in ASAPO/asapo from bugfix_HIDRA2-91-execute_process-project-location to develop

* commit '5f151467':
  Fixed working dir for determining version
parents 4eda445b 5f151467
Branches
Tags
No related merge requests found
execute_process(COMMAND git describe --tags --dirty OUTPUT_VARIABLE VERSION)
execute_process(COMMAND git describe --tags --dirty
OUTPUT_VARIABLE VERSION
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${VERSION} VERSION)
execute_process(COMMAND git rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE BRANCH)
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE BRANCH
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${BRANCH} BRANCH)
if (${BRANCH} STREQUAL "develop")
......@@ -10,10 +14,14 @@ else()
SET (ASAPO_VERSION ${BRANCH}.latest)
endif()
execute_process(COMMAND git describe --tags --abbrev=0 OUTPUT_VARIABLE VERSION_TAGS)
execute_process(COMMAND git describe --tags --abbrev=0
OUTPUT_VARIABLE VERSION_TAGS
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${VERSION_TAGS} VERSION_TAGS)
execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE VERSION_COMMIT)
execute_process(COMMAND git rev-parse --short HEAD
OUTPUT_VARIABLE VERSION_COMMIT
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${VERSION_COMMIT} VERSION_COMMIT)
function(cleanup varname)
......@@ -32,4 +40,4 @@ endif()
message("Asapo Version: " ${ASAPO_VERSION})
message("Asapo Version Python: " ${ASAPO_VERSION_PYTHON})
\ No newline at end of file
message("Asapo Version Python: " ${ASAPO_VERSION_PYTHON})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment