v29.4-roots.4 · Commit 37: [PATCH 37/37] fix(release): honor the configured Roots version tag
CMakeLists.txt
Before: CMakeLists.txt · After: CMakeLists.txt
File metadata
index 81b402ec803fb0af8cc26376db81f2269754a516..1575eadd8f9233e96b07d810e12479fb7fe47ec1 100644
Download original patch · Release notes
Diff rows 1–23 of 23. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
CMakeLists.txt
CHANGED
|
@@ -62,12 +62,21 @@ set(COPYRIGHT_HOLDERS_FINAL "The ${CLIENT_NAME} developers")
|
|
|
62
62
|
set(CLIENT_BUGREPORT "https://github.com/luganoplanb/bitcoin-roots/issues")
|
|
63
63
|
|
|
64
64
|
# Keep the user-visible Roots release name separate from the numeric protocol
|
|
65
|
-
# version. A normal v29.4-roots.1 Git tag still takes precedence in build info.
|
|
65
|
+
# version. Release builders supply CLIENT_VERSION_TAG even when Git metadata
|
|
66
|
+
# is unavailable; a clean Git tag still takes precedence in build info.
|
|
66
67
|
set(CLIENT_VERSION_STRING "${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}")
|
|
67
68
|
if(CLIENT_VERSION_RC GREATER 0)
|
|
68
69
|
string(APPEND CLIENT_VERSION_STRING "rc${CLIENT_VERSION_RC}")
|
|
69
70
|
endif()
|
|
70
|
-
string(APPEND CLIENT_VERSION_STRING "-roots.1")
|
|
71
|
+
if(DEFINED CLIENT_VERSION_TAG)
|
|
72
|
+
string(REPLACE "." "\\." client_version_tag_base_pattern "${CLIENT_VERSION_STRING}")
|
|
73
|
+
if(NOT CLIENT_VERSION_TAG MATCHES "^v${client_version_tag_base_pattern}-roots\\.[1-9][0-9]*$")
|
|
74
|
+
message(FATAL_ERROR "CLIENT_VERSION_TAG must be a Roots release tag for ${CLIENT_VERSION_STRING}.")
|
|
75
|
+
endif()
|
|
76
|
+
string(REGEX REPLACE "^v" "" CLIENT_VERSION_STRING "${CLIENT_VERSION_TAG}")
|
|
77
|
+
else()
|
|
78
|
+
string(APPEND CLIENT_VERSION_STRING "-roots.1")
|
|
79
|
+
endif()
|
|
71
80
|
|
|
72
81
|
#=============================
|
|
73
82
|
# Language setup
|