Skip to content

Commit

Permalink
clientversion: No suffix #if CLIENT_VERSION_IS_RELEASE
Browse files Browse the repository at this point in the history
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.

Github-Pull: bitcoin/bitcoin#22685
Rebased-From: 5100deee5822795d385570a380d3c117d05d851d
  • Loading branch information
dongcarl authored and fujicoin committed Aug 27, 2021
1 parent 2d4e6d1 commit f219eef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/clientversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f219eef

Please sign in to comment.