Skip to content

Commit 3facf0a

Browse files
committed
Merge bitcoin/bitcoin#22685: clientversion: No suffix #if CLIENT_VERSION_IS_RELEASE
5100dee clientversion: No suffix #if CLIENT_VERSION_IS_RELEASE (Carl Dong) Pull request description: ``` 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. ``` Fixes the underlying problem of #22623 ACKs for top commit: achow101: ACK 5100dee fanquake: ACK 5100dee - tested that prior the output of `src/bitcoind -version` on the `22.x` branch was `Bitcoin Core version v22.0.0-d3bd5410f64e`, and with this commit cherry-picked it is `Bitcoin Core version v22.0.0rc2`. Tree-SHA512: 78705e285ff1271d5012e888837049044db4d11d66c252c6b964685892ef078c56fe122f12daa87c71532f4352f695d1e88a228665adcd7afe3ddce3f209b49f
2 parents 820129a + 5100dee commit 3facf0a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/clientversion.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ const std::string CLIENT_NAME("Satoshi");
3030
#define BUILD_DESC BUILD_GIT_TAG
3131
#define BUILD_SUFFIX ""
3232
#else
33-
#define BUILD_DESC "v" STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_BUILD)
34-
#ifdef BUILD_GIT_COMMIT
33+
#define BUILD_DESC "v" PACKAGE_VERSION
34+
#if CLIENT_VERSION_IS_RELEASE
35+
#define BUILD_SUFFIX ""
36+
#elif defined(BUILD_GIT_COMMIT)
3537
#define BUILD_SUFFIX "-" BUILD_GIT_COMMIT
3638
#elif defined(GIT_COMMIT_ID)
3739
#define BUILD_SUFFIX "-g" GIT_COMMIT_ID

0 commit comments

Comments
 (0)