From 946376406fa8fd9129ee9f18e4e681c9fd19b36f Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Tue, 11 Nov 2025 09:00:32 +0100 Subject: [PATCH] refactor(clientversion): simplify version string formatting Replace direct CLIENT_BUILD usage with FormatVersion to consistently display semantic versioning. This omits trailing ".0" and git suffix when build number is zero, making version strings cleaner and more predictable. --- src/clientversion.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 942eca0..637e7c6 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -79,7 +79,11 @@ static std::string FormatVersion(int nVersion) std::string FormatFullVersion() { - return CLIENT_BUILD; + // Display a simplified semantic version: omit trailing ".0" and git suffix + // by reusing FormatVersion on the aggregated CLIENT_VERSION. + // This yields e.g. "v1.4.1" when CLIENT_VERSION_BUILD == 0, + // or "v1.4.1.1" if a non-zero build number is used. + return std::string("v") + FormatVersion(CLIENT_VERSION); } /**