]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
bos #26458 Versioning of sources via git commit id (sha1)
authorvsr <vsr@opencascade.com>
Sat, 2 Oct 2021 12:19:54 +0000 (15:19 +0300)
committervsr <vsr@opencascade.com>
Mon, 4 Oct 2021 17:42:47 +0000 (20:42 +0300)
CMakeLists.txt
bin/VERSION.in
src/KERNEL_PY/kernel/CMakeLists.txt
src/KERNEL_PY/kernel/__init__.py

index 4cc0b9201db64fc78a20514e694a71e9a14ad049..4e644d97c1e321684561828607a3111ab44e72dd 100755 (executable)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
 INCLUDE(CMakeDependentOption)
 
+# Project name
+# ============
+# original
 PROJECT(SalomeKERNEL C CXX)
-
-# Versioning
-# ===========
-# Project name, upper case
+# upper case
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
-SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
-SET(${PROJECT_NAME_UC}_VERSION
-  ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
-
 # Common CMake macros
 # ===================
 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
@@ -43,6 +36,11 @@ ELSE()
   MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
 ENDIF()
 
+# Versioning
+# ===========
+SALOME_SETUP_VERSION(9.7.0 DEVELOPMENT)
+MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"")
+
 # Platform setup
 # ==============
 INCLUDE(SalomeSetupPlatform)
@@ -199,7 +197,6 @@ ENDIF()
 
 # Header configuration
 # ====================
-SALOME_XVERSION(${PROJECT_NAME})
 SALOME_CONFIGURE_FILE(KERNEL_version.h.in KERNEL_version.h INSTALL ${SALOME_INSTALL_HEADERS})
 
 # Configuration export
index ab506d68da700af196e93b7d35f8b83ef1d8bbb5..57196a10cc0e838d7e3338b14598455e4c6bfa9d 100644 (file)
@@ -1,2 +1,3 @@
 [SALOME KERNEL] : @SALOMEKERNEL_VERSION@
 [DEVELOPMENT]   : @SALOMEKERNEL_VERSION_DEV@
+[SHA1]          : @SALOMEKERNEL_GIT_SHA1@
index 731a78133426defb9d653b0a24fb69c17dc5113b..5f6977cdc0470772c3574331b981f1065601088d 100644 (file)
@@ -21,11 +21,11 @@ ADD_SUBDIRECTORY(parametric)
 
 SALOME_CONFIGURE_FILE(logconfig.py.in logconfig.py)
 SALOME_CONFIGURE_FILE(kernelpy_autotest.sh.in kernelpy_autotest.sh)
+SALOME_CONFIGURE_FILE(__init__.py __init__.py INSTALL ${SALOME_INSTALL_PYTHON}/salome/kernel)
 
 # This first set of modules could be used in any context, you just
 # have to get a python environment.
 SET(mypkgpython_PYTHON
-    __init__.py
     deprecation.py
     logger.py
     termcolor.py
index aef1fa3fe59a01bd4a1635aa4fa860e37884eea4..63c5236188193ccc5ca7d0057f65411261ddc1a9 100644 (file)
@@ -35,6 +35,7 @@
 #  \}
 
 __all__ = [ "deprecation", "logger", "termcolor", "logconfig" ]
+__version__ = "@SALOMEKERNEL_GIT_SHA1@"
 
 # WARN: This file SHOULD NOT import salome stuff so that modules of the
 # package could be used outside of a SALOME session context when