Add build information to --version-full
If the Jenkins build information is available, print it in the full version output.
This commit is contained in:
parent
d764bb9e1f
commit
84a6848f10
@ -162,6 +162,13 @@ if(${MAXSCALE_VERSION} MATCHES "-stable")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Copy cmake_flags, JENKINS_BUILD_TAG, source and value evironmental variables
|
||||
# into cmake variables. These are used by the build system to store information
|
||||
# about the packages being built.
|
||||
set(MAXSCALE_SOURCE "$ENV{source} $ENV{value}")
|
||||
set(MAXSCALE_CMAKE_FLAGS "$ENV{cmake_flags}")
|
||||
set(MAXSCALE_JENKINS_BUILD_TAG "$ENV{BUILD_TAG}")
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/server/include)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/server/include/version.h.in ${CMAKE_BINARY_DIR}/server/include/version.h @ONLY)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/server/include/gwdirs.h.in ${CMAKE_BINARY_DIR}/server/include/gwdirs.h @ONLY)
|
||||
|
@ -1341,6 +1341,18 @@ int main(int argc, char **argv)
|
||||
case 'V':
|
||||
rc = EXIT_SUCCESS;
|
||||
printf("MaxScale %s - %s\n", MAXSCALE_VERSION, maxscale_commit);
|
||||
if (strcmp(MAXSCALE_SOURCE, " ") != 0)
|
||||
{
|
||||
printf("Source: %s\n", MAXSCALE_SOURCE);
|
||||
}
|
||||
if (strcmp(MAXSCALE_CMAKE_FLAGS, "") != 0)
|
||||
{
|
||||
printf("CMake flags: %s\n", MAXSCALE_CMAKE_FLAGS);
|
||||
}
|
||||
if (strcmp(MAXSCALE_JENKINS_BUILD_TAG, "") != 0)
|
||||
{
|
||||
printf("Jenkins build: %s\n", MAXSCALE_JENKINS_BUILD_TAG);
|
||||
}
|
||||
goto return_main;
|
||||
|
||||
case 'l':
|
||||
|
@ -1,2 +1,5 @@
|
||||
#define MAXSCALE_VERSION "@MAXSCALE_VERSION@"
|
||||
#define MAXSCALE_COMMIT "@MAXSCALE_COMMIT@"
|
||||
#define MAXSCALE_SOURCE "@MAXSCALE_SOURCE@"
|
||||
#define MAXSCALE_CMAKE_FLAGS "@MAXSCALE_CMAKE_FLAGS@"
|
||||
#define MAXSCALE_JENKINS_BUILD_TAG "@MAXSCALE_JENKINS_BUILD_TAG@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user