diff options
author | Carl Dong <contact@carldong.me> | 2021-08-11 15:52:29 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-08-11 16:44:11 -0400 |
commit | 5100deee5822795d385570a380d3c117d05d851d (patch) | |
tree | 776245cafb88a05196cc82aed923e22a04712579 /src/clientversion.cpp | |
parent | e614cc8cd808902c843568f1790730622d619620 (diff) |
clientversion: No suffix #if CLIENT_VERSION_IS_RELEASE
Previously, building from a release source tarball would result in a
version string like v22.0.0-<commithash>, but we expect just v22.0.0.
This commit solves this problem.
Also use PACKAGE_VERSION instead of reconstructing it.
Diffstat (limited to 'src/clientversion.cpp')
-rw-r--r-- | src/clientversion.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 29c38e2d3b..195f58b3f3 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -30,8 +30,10 @@ const std::string CLIENT_NAME("Satoshi"); #define BUILD_DESC BUILD_GIT_TAG #define BUILD_SUFFIX "" #else - #define BUILD_DESC "v" STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_BUILD) - #ifdef BUILD_GIT_COMMIT + #define BUILD_DESC "v" PACKAGE_VERSION + #if CLIENT_VERSION_IS_RELEASE + #define BUILD_SUFFIX "" + #elif defined(BUILD_GIT_COMMIT) #define BUILD_SUFFIX "-" BUILD_GIT_COMMIT #elif defined(GIT_COMMIT_ID) #define BUILD_SUFFIX "-g" GIT_COMMIT_ID |