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

use latest tag for all except master

parent d393d65a
Branches doc_update
No related tags found
No related merge requests found
execute_process(COMMAND git describe --tags --dirty
execute_process(COMMAND git describe --tags --abbrev=0
OUTPUT_VARIABLE VERSION
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${VERSION} VERSION)
......@@ -8,17 +8,12 @@ execute_process(COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${BRANCH} BRANCH)
if (${BRANCH} STREQUAL "develop")
if (${BRANCH} STREQUAL "master")
SET (ASAPO_VERSION ${BRANCH}.${VERSION})
else()
SET (ASAPO_VERSION ${BRANCH}.latest)
endif()
execute_process(COMMAND git describe --tags --abbrev=0
OUTPUT_VARIABLE ASAPO_VERSION_TAG
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${ASAPO_VERSION_TAG} ASAPO_VERSION_TAG)
execute_process(COMMAND git rev-parse --short HEAD
OUTPUT_VARIABLE VERSION_COMMIT
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
......@@ -39,10 +34,10 @@ endif()
if (${BRANCH} STREQUAL "develop")
SET (ASAPO_VERSION_PYTHON ${ASAPO_VERSION_TAG}.${BRANCH}.${VERSION_COMMIT})
if (${BRANCH} STREQUAL "master")
SET (ASAPO_VERSION_PYTHON ${ASAPO_VERSION})
else()
SET (ASAPO_VERSION_PYTHON ${ASAPO_VERSION_TAG}.${BRANCH}.latest)
SET (ASAPO_VERSION_PYTHON ${ASAPO_VERSION}.${BRANCH}.latest)
endif()
......
......@@ -6,19 +6,19 @@ if(DOXYGEN_EXECUTABLE)
add_custom_target(
docs-cpp-producer
COMMAND
PROJECT_NUMBER=${ASAPO_VERSION_TAG}-${ASAPO_VERSION} ${DOXYGEN_EXECUTABLE} doxygen.ini VERBATIM
PROJECT_NUMBER=${ASAPO_VERSION} ${DOXYGEN_EXECUTABLE} doxygen.ini VERBATIM
WORKING_DIRECTORY producer
)
add_custom_target(
docs-cpp-consumer
COMMAND
PROJECT_NUMBER=${ASAPO_VERSION_TAG}-${ASAPO_VERSION} ${DOXYGEN_EXECUTABLE} doxygen.ini VERBATIM
PROJECT_NUMBER=${ASAPO_VERSION} ${DOXYGEN_EXECUTABLE} doxygen.ini VERBATIM
WORKING_DIRECTORY consumer
)
add_custom_target(
docs-cpp ALL
COMMAND
PROJECT_NUMBER=${ASAPO_VERSION_TAG}-${ASAPO_VERSION} ${DOXYGEN_EXECUTABLE} doxygen.ini VERBATIM
PROJECT_NUMBER=${ASAPO_VERSION} ${DOXYGEN_EXECUTABLE} doxygen.ini VERBATIM
)
add_dependencies(docs-cpp docs-cpp-producer docs-cpp-consumer)
else()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment