MXS-1942: Use MaxScale version in MaxCtrl
Displaying the MaxScale version helps identify which package the executable was bundled with. As the MaxCtrl source is a part of MaxScale, there's no need for separate versioning.
This commit is contained in:
parent
9e039ed024
commit
f5110209f7
@ -3,6 +3,9 @@ if (BUILD_MAXCTRL)
|
||||
find_package(NodeJS)
|
||||
|
||||
if (NPM_FOUND AND NODEJS_FOUND AND NODEJS_VERSION VERSION_GREATER "6.0.0")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/version.js.in ${CMAKE_CURRENT_BINARY_DIR}/lib/version.js @ONLY)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/maxctrl/maxctrl
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.sh ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
@ -14,7 +14,9 @@
|
||||
var fs = require('fs')
|
||||
var program = require('yargs');
|
||||
|
||||
const maxctrl_version = '1.0.0';
|
||||
// Note: The version.js file is generated at configuation time. If you are
|
||||
// building in-source, manually create the file
|
||||
const maxctrl_version = require('./version.js').version;
|
||||
|
||||
program
|
||||
.version(maxctrl_version)
|
||||
|
14
maxctrl/lib/version.js.in
Normal file
14
maxctrl/lib/version.js.in
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
* Use of this software is governed by the Business Source License included
|
||||
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
||||
*
|
||||
* Change Date: 2020-01-01
|
||||
*
|
||||
* On the date above, in accordance with the Business Source License, use
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
exports.version = "@MAXSCALE_VERSION@"
|
Loading…
x
Reference in New Issue
Block a user