Skip to content

Commit

Permalink
build_version: apply the build tag to the Speedb version string (#231)
Browse files Browse the repository at this point in the history
The changes in #157 were accidentally applied to the `GetRocksVersionAsString()`
function instead of the `GetSpeedbVersionAsString()` function. This replaced
the RocksDB patch number with the Speedb one, and added the build tag in
the wrong place.

Fix it by moving the logic to the intended function.
  • Loading branch information
isaac-io committed Nov 12, 2022
1 parent 1698da4 commit 6441b21
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions util/build_version.cc.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ const std::unordered_map<std::string, std::string>& GetRocksBuildProperties() {

std::string GetRocksVersionAsString(bool with_patch) {
std::string version = ToString(ROCKSDB_MAJOR) + "." + ToString(ROCKSDB_MINOR);
if (with_patch) {
return version + "." + ToString(ROCKSDB_PATCH);
} else {
return version;
}
}

std::string GetSpeedbVersionAsString(bool with_patch) {
std::string version = ToString(SPEEDB_MAJOR) + "." + ToString(SPEEDB_MINOR);
if (with_patch) {
version += "." + ToString(SPEEDB_PATCH);
// Only add a build tag if it was specified (e.g. not a release build)
Expand All @@ -83,15 +92,6 @@ std::string GetRocksVersionAsString(bool with_patch) {
return version;
}

std::string GetSpeedbVersionAsString(bool with_patch) {
std::string version = ToString(SPEEDB_MAJOR) + "." + ToString(SPEEDB_MINOR);
if (with_patch) {
return version + "." + ToString(SPEEDB_PATCH);
} else {
return version;
}
}

std::string GetRocksBuildInfoAsString(const std::string& program, bool verbose) {
std::string info = program + " (Speedb) " + GetSpeedbVersionAsString(true) +
" (" + GetRocksVersionAsString(true) + ")";
Expand Down

0 comments on commit 6441b21

Please sign in to comment.