Add symbolic VERSION file
The VERSION.cmake file defines which VERSION.cmake file is included. By changing the file that it points to, the version can be changed without it affecting other parts of the code that use it.
This commit is contained in:
@ -16,7 +16,7 @@ endif()
|
||||
|
||||
# Set default values for cache entries and set the MaxScale version
|
||||
include(cmake/defaults.cmake)
|
||||
include(VERSION22.cmake)
|
||||
include(VERSION.cmake)
|
||||
include(ExternalProject)
|
||||
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
major=`cmake -P ../../VERSION22.cmake -L|grep 'MAXSCALE_VERSION_MAJOR'|sed 's/.*=//'`
|
||||
minor=`cmake -P ../../VERSION22.cmake -L|grep 'MAXSCALE_VERSION_MINOR'|sed 's/.*=//'`
|
||||
patch=`cmake -P ../../VERSION22.cmake -L|grep 'MAXSCALE_VERSION_PATCH'|sed 's/.*=//'`
|
||||
maturity=`cmake -P ../../VERSION22.cmake -L|grep 'MAXSCALE_MATURITY'|sed 's/.*=//'`
|
||||
major=`cmake -P ../../VERSION.cmake -L|grep 'MAXSCALE_VERSION_MAJOR'|sed 's/.*=//'`
|
||||
minor=`cmake -P ../../VERSION.cmake -L|grep 'MAXSCALE_VERSION_MINOR'|sed 's/.*=//'`
|
||||
patch=`cmake -P ../../VERSION.cmake -L|grep 'MAXSCALE_VERSION_PATCH'|sed 's/.*=//'`
|
||||
maturity=`cmake -P ../../VERSION.cmake -L|grep 'MAXSCALE_MATURITY'|sed 's/.*=//'`
|
||||
|
||||
VERSION=${major}.${minor}.${patch}
|
||||
|
||||
|
||||
1
VERSION.cmake
Normal file
1
VERSION.cmake
Normal file
@ -0,0 +1 @@
|
||||
include(VERSION22.cmake)
|
||||
@ -1,2 +1,2 @@
|
||||
include(../VERSION22.cmake)
|
||||
include(../VERSION.cmake)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/version.js.in ${CMAKE_CURRENT_BINARY_DIR}/lib/version.js @ONLY)
|
||||
|
||||
Reference in New Issue
Block a user