diff --git a/Code/Mantid/Framework/Kernel/CMakeLists.txt b/Code/Mantid/Framework/Kernel/CMakeLists.txt index 37a95ec5f64580f34f7147c7cbaaeaca80a90f8f..2e17581e30776de1aabaf86b4cd4138364cebfa3 100644 --- a/Code/Mantid/Framework/Kernel/CMakeLists.txt +++ b/Code/Mantid/Framework/Kernel/CMakeLists.txt @@ -366,6 +366,7 @@ add_subdirectory ( test ) # determine it from git and the file already exists. This makes sure the # version number is correct when building off the source tarball +include (PatchVersionNumber) if ( NOT NOT_GIT_REPO OR NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/MantidVersion.cpp ) configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/src/MantidVersion.cpp.in ${CMAKE_CURRENT_SOURCE_DIR}/src/MantidVersion.cpp diff --git a/Code/Mantid/Framework/Kernel/inc/MantidKernel/MantidVersion.h b/Code/Mantid/Framework/Kernel/inc/MantidKernel/MantidVersion.h index 654ee178262691b4b5bdf8ceab64c46f6ced7338..533ef742b43ad8408b4866e48aa36e69aaf0a384 100644 --- a/Code/Mantid/Framework/Kernel/inc/MantidKernel/MantidVersion.h +++ b/Code/Mantid/Framework/Kernel/inc/MantidKernel/MantidVersion.h @@ -37,6 +37,7 @@ class MANTID_KERNEL_DLL MantidVersion public: static const char* version(); ///< The full version number static const char* revision(); ///< The abbreviated SHA-1 of the last commit + static const char* revisionFull(); ///< The full SHA-1 of the last commit static const char* releaseDate(); ///< The date of the last commit private: diff --git a/Code/Mantid/Framework/Kernel/src/ConfigService.cpp b/Code/Mantid/Framework/Kernel/src/ConfigService.cpp index 86e76cdf2a026b53614eb16dae11cf92cefea651..5dfc1fdc3c10d107e468b410f45c8d8127d19ca7 100644 --- a/Code/Mantid/Framework/Kernel/src/ConfigService.cpp +++ b/Code/Mantid/Framework/Kernel/src/ConfigService.cpp @@ -54,7 +54,7 @@ namespace Mantid */ std::string welcomeMessage() { - return "Welcome to Mantid " + std::string(Mantid::Kernel::MantidVersion::version()) + " - Manipulation and Analysis Toolkit for Instrument Data"; + return "Welcome to Mantid version " + std::string(Mantid::Kernel::MantidVersion::version()) + " - Manipulation and Analysis Toolkit for Instrument Data"; } namespace Kernel @@ -264,8 +264,8 @@ ConfigServiceImpl::ConfigServiceImpl() : g_log.debug() << "ConfigService created." << std::endl; g_log.debug() << "Configured Mantid.properties directory of application as " << getPropertiesDir() << std::endl; - g_log.information() << "This is Mantid Version " - << MantidVersion::version() << "-" << MantidVersion::revision() << std::endl; + g_log.information() << "This is Mantid version " + << MantidVersion::version() << " revision " << MantidVersion::revision() << std::endl; g_log.information() << "Properties file(s) loaded: " << propertiesFilesList << std::endl; #ifndef MPI_BUILD // There is no logging to file by default in MPI build g_log.information() << "Logging to: " << m_logFilePath << std::endl; diff --git a/Code/Mantid/Framework/Kernel/src/MantidVersion.cpp.in b/Code/Mantid/Framework/Kernel/src/MantidVersion.cpp.in index 2554784c8194c83be3a88c2fd1d29d06136eeed4..932e96de1924baf17ec06d9760c4c0db89cb1aa1 100644 --- a/Code/Mantid/Framework/Kernel/src/MantidVersion.cpp.in +++ b/Code/Mantid/Framework/Kernel/src/MantidVersion.cpp.in @@ -12,7 +12,7 @@ const char* MantidVersion::version() { // The major and minor version numbers are specified in Build/CMake/VersionNumber.cmake // The patch number is the number of commits since the most recent tag of the repository - return "@VERSION_MAJOR@.@VERSION_MINOR@.@MtdVersion_WC_LAST_CHANGED_REV@"; + return "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@"; } const char* MantidVersion::revision() @@ -20,6 +20,11 @@ const char* MantidVersion::revision() return "@MtdVersion_WC_LAST_CHANGED_SHA@"; } +const char* MantidVersion::revisionFull() +{ + return "@MtdVersion_WC_LAST_CHANGED_SHA_LONG@"; +} + const char* MantidVersion::releaseDate() { return "@MtdVersion_WC_LAST_CHANGED_DATE@";