v30.3-roots.1 · Commit 37: [PATCH 37/68] fix(release): honor the configured Roots version tag
CMakeLists.txt
Before: CMakeLists.txt · After: CMakeLists.txt
File metadata
index 7833350179aa29bb12679204407830bbad23282d..3c7e666823c89407b78790fb62a676fa4d5e4e8c 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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
CMakeLists.txt
CHANGED
|
@@ -62,12 +62,21 @@ set(COPYRIGHT_HOLDERS_FINAL "The ${CLIENT_NAME} developers")
|
|
| 62 |
set(CLIENT_BUGREPORT "https://github.com/luganoplanb/bitcoin-roots/issues")
|
| 63 |
|
| 64 |
# Keep the user-visible Roots release name separate from the numeric protocol
|
| 65 |
-
# version. A normal v30.3-roots.1 Git tag still takes precedence in build info.
|
|
|
|
| 66 |
set(CLIENT_VERSION_STRING "${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}")
|
| 67 |
if(CLIENT_VERSION_RC GREATER 0)
|
| 68 |
string(APPEND CLIENT_VERSION_STRING "rc${CLIENT_VERSION_RC}")
|
| 69 |
endif()
|
| 70 |
-
string(APPEND CLIENT_VERSION_STRING "-roots.1")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
#=============================
|
| 73 |
# Language setup
|
|
|
|
| 62 |
set(CLIENT_BUGREPORT "https://github.com/luganoplanb/bitcoin-roots/issues")
|
| 63 |
|
| 64 |
# Keep the user-visible Roots release name separate from the numeric protocol
|
| 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.
|
| 67 |
set(CLIENT_VERSION_STRING "${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}")
|
| 68 |
if(CLIENT_VERSION_RC GREATER 0)
|
| 69 |
string(APPEND CLIENT_VERSION_STRING "rc${CLIENT_VERSION_RC}")
|
| 70 |
endif()
|
| 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()
|
| 80 |
|
| 81 |
#=============================
|
| 82 |
# Language setup
|