diff --git a/build-config.h.cmake b/build-config.h.cmake index b9300ed1217..6976d3eddf3 100644 --- a/build-config.h.cmake +++ b/build-config.h.cmake @@ -94,6 +94,14 @@ #define BUILD_VERSION_POINT ${HPCC_POINT} #endif +#ifndef BUILD_MATURITY + #define BUILD_MATURITY "${HPCC_MATURITY}" +#endif + +#ifndef BUILD_TAG_TIMESTAMP + #define BUILD_TAG_TIMESTAMP "${HPCC_TAG_TIMESTAMP}" +#endif + #ifndef BASE_BUILD_TAG #cmakedefine BASE_BUILD_TAG "${BASE_BUILD_TAG}" #endif diff --git a/esp/scm/ws_workunits_req_resp.ecm b/esp/scm/ws_workunits_req_resp.ecm index 5047bd31e4e..13ebf9b250c 100644 --- a/esp/scm/ws_workunits_req_resp.ecm +++ b/esp/scm/ws_workunits_req_resp.ecm @@ -939,6 +939,7 @@ ESPresponse [exceptions_inline] WUCreateZAPInfoResponse ESPrequest [nil_remove] WUCheckFeaturesRequest { + boolean IncludeFullVersion(false); }; ESPresponse [exceptions_inline] WUCheckFeaturesResponse @@ -948,6 +949,12 @@ ESPresponse [exceptions_inline] WUCheckFeaturesResponse int BuildVersionPoint; unsigned maxRequestEntityLength; ESPStruct DeploymentFeatures Deployment; + //The following fields are only generated if IncludeFullVersion is set. Normally the fields would be versioned, + //but this change is applied to a much earlier version and the version number has been incremented several times, + //so that approach cannot be used. + string BuildVersion; + string BuildMaturity; + string BuildTagTimestamp; }; ESPrequest [nil_remove] WUGetStatsRequest diff --git a/esp/services/ws_workunits/ws_workunitsService.cpp b/esp/services/ws_workunits/ws_workunitsService.cpp index 2f1fc09c8df..6c2db6ff460 100644 --- a/esp/services/ws_workunits/ws_workunitsService.cpp +++ b/esp/services/ws_workunits/ws_workunitsService.cpp @@ -5085,6 +5085,13 @@ bool CWsWorkunitsEx::onWUCheckFeatures(IEspContext &context, IEspWUCheckFeatures resp.setBuildVersionMajor(hpccBuildInfo.buildVersionMajor); resp.setBuildVersionMinor(hpccBuildInfo.buildVersionMinor); resp.setBuildVersionPoint(hpccBuildInfo.buildVersionPoint); + //This does not check version because a consistent version could not be used for all the places it was included + if (req.getIncludeFullVersion()) + { + resp.setBuildVersion(hpccBuildInfo.buildTag); + resp.setBuildMaturity(hpccBuildInfo.buildMaturity); + resp.setBuildTagTimestamp(hpccBuildInfo.buildTagTimestamp); + } resp.setMaxRequestEntityLength(maxRequestEntityLength); resp.updateDeployment().setUseCompression(true); return true; diff --git a/system/jlib/jutil.cpp b/system/jlib/jutil.cpp index 90779f3b702..3aabce9f92e 100644 --- a/system/jlib/jutil.cpp +++ b/system/jlib/jutil.cpp @@ -109,6 +109,8 @@ static void initBuildVars() hpccBuildInfo.buildVersionMinor = BUILD_VERSION_MINOR; hpccBuildInfo.buildVersionPoint = BUILD_VERSION_POINT; hpccBuildInfo.buildVersion = estringify(BUILD_VERSION_MAJOR) "." estringify(BUILD_VERSION_MINOR) "." estringify(BUILD_VERSION_POINT); + hpccBuildInfo.buildMaturity = BUILD_MATURITY; + hpccBuildInfo.buildTagTimestamp = BUILD_TAG_TIMESTAMP; hpccBuildInfo.dirName = DIR_NAME; hpccBuildInfo.prefix = PREFIX; diff --git a/system/jlib/jutil.hpp b/system/jlib/jutil.hpp index e90c44f36fe..a6fa94f2a46 100644 --- a/system/jlib/jutil.hpp +++ b/system/jlib/jutil.hpp @@ -640,6 +640,8 @@ struct HPCCBuildInfo unsigned buildVersionMinor; unsigned buildVersionPoint; const char *buildVersion; + const char *buildMaturity; + const char *buildTagTimestamp; }; extern jlib_decl HPCCBuildInfo hpccBuildInfo;