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

change version tags for python

parent 9b479457
No related branches found
No related tags found
No related merge requests found
execute_process(COMMAND git describe --tags --dirty OUTPUT_VARIABLE VERSION)
string(STRIP ${VERSION} VERSION)
execute_process(COMMAND git rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE BRANCH)
string(STRIP ${BRANCH} BRANCH)
if (${BRANCH} STREQUAL "develop")
SET (ASAPO_VERSION ${BRANCH}.${VERSION})
else()
SET (ASAPO_VERSION ${BRANCH}.latest)
endif()
string(TIMESTAMP TIMESTAMP "%H:%M:%S %d.%m.%Y UTC" UTC)
configure_file(${PROJECT_SOURCE_DIR}/common/cpp/include/common/version.h.in ${PROJECT_SOURCE_DIR}/common/cpp/include/common/version.h @ONLY)
......
......@@ -10,3 +10,26 @@ else()
SET (ASAPO_VERSION ${BRANCH}.latest)
endif()
execute_process(COMMAND git describe --tags --abbrev=0 OUTPUT_VARIABLE VERSION_TAGS)
string(STRIP ${VERSION_TAGS} VERSION_TAGS)
execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE VERSION_COMMIT)
string(STRIP ${VERSION_COMMIT} VERSION_COMMIT)
function(cleanup varname)
string (REPLACE "-" "_" out ${${varname}})
SET( ${varname} ${out} PARENT_SCOPE)
endfunction()
cleanup(BRANCH)
if (${BRANCH} STREQUAL "develop")
SET (ASAPO_VERSION_PYTHON ${VERSION_TAGS}.${BRANCH}.${VERSION_COMMIT})
else()
SET (ASAPO_VERSION_PYTHON ${VERSION_TAGS}.${BRANCH}.latest)
endif()
message("Asapo Version: " ${ASAPO_VERSION})
message("Asapo Version Python: " ${ASAPO_VERSION_PYTHON})
\ No newline at end of file
......@@ -2,7 +2,7 @@ import setuptools
setuptools.setup(
name ="asapo_worker",
version = "@ASAPO_VERSION@",
version = "@ASAPO_VERSION_PYTHON@",
install_requires=['numpy'],
include_package_data=True,
packages=['asapo_worker'],
......
......@@ -15,7 +15,7 @@ ext_modules = [
setup(
name ="asapo_worker",
ext_modules = ext_modules,
version = "@ASAPO_VERSION@",
version = "@ASAPO_VERSION_PYTHON@",
setup_requires=["numpy"],
install_requires=["numpy"]
)
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