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

rename tags

parent f780fb81
No related branches found
No related tags found
No related merge requests found
function(cleanup varname)
string (REPLACE "-" "_" out ${${varname}})
SET( ${varname} ${out} PARENT_SCOPE)
endfunction()
execute_process(COMMAND git describe --tags --abbrev=0 execute_process(COMMAND git describe --tags --abbrev=0
OUTPUT_VARIABLE VERSION OUTPUT_VARIABLE ASAPO_TAG
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${VERSION} VERSION) string(STRIP ${ASAPO_TAG} ASAPO_TAG)
execute_process(COMMAND git rev-parse --abbrev-ref HEAD execute_process(COMMAND git rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE BRANCH OUTPUT_VARIABLE BRANCH
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${BRANCH} BRANCH) string(STRIP ${BRANCH} BRANCH)
cleanup(BRANCH)
if (${BRANCH} STREQUAL "master")
SET (ASAPO_VERSION ${BRANCH}.${VERSION})
else()
SET (ASAPO_VERSION ${BRANCH}.latest)
endif()
execute_process(COMMAND git rev-parse --short HEAD execute_process(COMMAND git rev-parse --short HEAD
OUTPUT_VARIABLE VERSION_COMMIT OUTPUT_VARIABLE ASAPO_VERSION_COMMIT
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
string(STRIP ${VERSION_COMMIT} VERSION_COMMIT) string(STRIP ${ASAPO_VERSION_COMMIT} ASAPO_VERSION_COMMIT)
function(cleanup varname)
string (REPLACE "-" "_" out ${${varname}})
SET( ${varname} ${out} PARENT_SCOPE)
endfunction()
cleanup(BRANCH)
if (${BRANCH} STREQUAL "master") if (${BRANCH} STREQUAL "master")
SET (ASAPO_VERSION ${ASAPO_TAG})
SET (ASAPO_VERSION_COMMIT "")
SET (ASAPO_VERSION_DOCKER_SUFFIX "") SET (ASAPO_VERSION_DOCKER_SUFFIX "")
else() else()
SET (ASAPO_VERSION ${BRANCH})
SET (ASAPO_VERSION_COMMIT ", build ${ASAPO_VERSION_COMMIT}")
SET (ASAPO_VERSION_DOCKER_SUFFIX "-dev") SET (ASAPO_VERSION_DOCKER_SUFFIX "-dev")
endif() endif()
if (${BRANCH} STREQUAL "master")
SET (ASAPO_VERSION_PYTHON ${ASAPO_VERSION})
else()
SET (ASAPO_VERSION_PYTHON ${ASAPO_VERSION}.${BRANCH}.latest)
endif()
message("Asapo Version: " ${ASAPO_VERSION}) message("Asapo Version: " ${ASAPO_VERSION})
message("Asapo Version Python: " ${ASAPO_VERSION_PYTHON}) message("Asapo commit: " ${ASAPO_VERSION_COMMIT})
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
namespace asapo { namespace asapo {
const char kVersion[] = "@VERSION@"; const char kVersion[] = "@ASAPO_VERSION@@ASAPO_VERSION_COMMIT@";
inline void ExitAfterPrintVersionIfNeeded(std::string prefix,int argc, char* argv[]) { inline void ExitAfterPrintVersionIfNeeded(std::string prefix,int argc, char* argv[]) {
if (argc == 2 && strcmp(argv[1], "-v") == 0) { if (argc == 2 && strcmp(argv[1], "-v") == 0) {
......
...@@ -3,5 +3,5 @@ package version ...@@ -3,5 +3,5 @@ package version
// Default build-time variable for library-import. // Default build-time variable for library-import.
// This file is overridden on build with build-time informations. // This file is overridden on build with build-time informations.
func init(){ func init(){
version = "@VERSION@" version = "@ASAPO_VERSION@@ASAPO_VERSION_COMMIT@"
} }
...@@ -290,4 +290,4 @@ def create_server_broker(server_name,source_path,has_filesystem,beamtime_id,stre ...@@ -290,4 +290,4 @@ def create_server_broker(server_name,source_path,has_filesystem,beamtime_id,stre
return factory.create_server_broker(_bytes(server_name),_bytes(source_path),has_filesystem, _bytes(beamtime_id),_bytes(stream),_bytes(token),timeout_ms) return factory.create_server_broker(_bytes(server_name),_bytes(source_path),has_filesystem, _bytes(beamtime_id),_bytes(stream),_bytes(token),timeout_ms)
__version__ = "@ASAPO_VERSION_PYTHON@" __version__ = "@ASAPO_VERSION@@ASAPO_VERSION_COMMIT@"
...@@ -2,7 +2,7 @@ import setuptools ...@@ -2,7 +2,7 @@ import setuptools
setuptools.setup( setuptools.setup(
name ="asapo_consumer", name ="asapo_consumer",
version = "@ASAPO_VERSION_PYTHON@", version = "@ASAPO_VERSION@",
install_requires=['numpy'], install_requires=['numpy'],
include_package_data=True, include_package_data=True,
packages=['asapo_consumer'], packages=['asapo_consumer'],
......
...@@ -14,7 +14,7 @@ ext_modules = [ ...@@ -14,7 +14,7 @@ ext_modules = [
setup( setup(
name ="asapo_consumer", name ="asapo_consumer",
ext_modules = ext_modules, ext_modules = ext_modules,
version = "@ASAPO_VERSION_PYTHON@", version = "@ASAPO_VERSION@",
setup_requires=["numpy"], setup_requires=["numpy"],
install_requires=["numpy"] install_requires=["numpy"]
) )
...@@ -57,7 +57,8 @@ common: ...@@ -57,7 +57,8 @@ common:
authSecret: "12ljzgneasfd" authSecret: "12ljzgneasfd"
offlineDir: "/test_offline" offlineDir: "/test_offline"
onlineDir: "/test_online" onlineDir: "/test_online"
asapoVersionTag: "feature_ASAPO-108-kubernetes-deployment.latest" asapoVersionTag: "develop"
asapoRepositoryTag: "-dev"
influxdb: influxdb:
authEnabled: false authEnabled: false
......
elk_logs = true elk_logs = true
asapo_image_tag = "feature_ASAPO-108-kubernetes-deployment.latest" asapo_image_tag = "develop"
service_dir="/gpfs/asapo/shared/service_dir" service_dir="/gpfs/asapo/shared/service_dir"
online_dir="/beamline" online_dir="/beamline"
......
...@@ -314,4 +314,4 @@ def create_producer(endpoint,beamtime_id,beamline,stream,token,nthreads,timeout_ ...@@ -314,4 +314,4 @@ def create_producer(endpoint,beamtime_id,beamline,stream,token,nthreads,timeout_
return PyProducer.__create_producer(_bytes(endpoint),_bytes(beamtime_id),_bytes(beamline),_bytes(stream),_bytes(token),nthreads,timeout_sec) return PyProducer.__create_producer(_bytes(endpoint),_bytes(beamtime_id),_bytes(beamline),_bytes(stream),_bytes(token),nthreads,timeout_sec)
__version__ = "@ASAPO_VERSION_PYTHON@" __version__ = "@ASAPO_VERSION@@ASAPO_VERSION_COMMIT@"
...@@ -2,7 +2,7 @@ import setuptools ...@@ -2,7 +2,7 @@ import setuptools
setuptools.setup( setuptools.setup(
name ="asapo_producer", name ="asapo_producer",
version = "@ASAPO_VERSION_PYTHON@", version = "@ASAPO_VERSION@",
install_requires=['numpy'], install_requires=['numpy'],
include_package_data=True, include_package_data=True,
packages=['asapo_producer'], packages=['asapo_producer'],
......
...@@ -14,7 +14,7 @@ ext_modules = [ ...@@ -14,7 +14,7 @@ ext_modules = [
setup( setup(
name ="asapo_producer", name ="asapo_producer",
ext_modules = ext_modules, ext_modules = ext_modules,
version = "@ASAPO_VERSION_PYTHON@", version = "@ASAPO_VERSION@",
setup_requires=["numpy","cython>=0.28"], setup_requires=["numpy","cython>=0.28"],
install_requires=["numpy","cython>=0.28"] install_requires=["numpy","cython>=0.28"]
) )
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