mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Record the version of the source repository that was used to build the leveldb library.
Summary: Record the version of the source that we are compiling. We keep a record of the git revision in util/version.cc. This source file is then built as a regular source file as part of the compilation process. One can run "strings executable_filename | grep _build_" to find the version of the source that we used to build the executable file. Test Plan: none Differential Revision: https://reviews.facebook.net/D4785
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "util/coding.h"
|
||||
#include "util/logging.h"
|
||||
#include "util/mutexlock.h"
|
||||
#include "util/build_version.h"
|
||||
|
||||
namespace leveldb {
|
||||
|
||||
@@ -1544,4 +1545,13 @@ Status DestroyDB(const std::string& dbname, const Options& options) {
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// A global method that can dump out the build version
|
||||
void printLeveldbBuildVersion() {
|
||||
printf("Git sha %s", leveldb_build_git_sha);
|
||||
printf("Git datetime %s", leveldb_build_git_datetime);
|
||||
printf("Compile time %s", leveldb_build_compile_time);
|
||||
printf("Compile date %s", leveldb_build_compile_date);
|
||||
}
|
||||
|
||||
} // namespace leveldb
|
||||
|
||||
Reference in New Issue
Block a user