Skip to content

Commit

Permalink
FIXUP: Rework version handling
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Mar 1, 2024
1 parent ca732f1 commit 77aa550
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,26 @@
# See: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html
cmake_minimum_required(VERSION 3.16...3.28)

set(PACKAGE_NAME "Bitcoin Core")
set(CLIENT_VERSION_MAJOR 26)
set(CLIENT_VERSION_MINOR 99)
set(CLIENT_VERSION_BUILD 0)
set(CLIENT_VERSION_RC 0)
set(CLIENT_VERSION_IS_RELEASE "false")
set(COPYRIGHT_YEAR "2024")

project(BitcoinCore
VERSION 26.99.0
VERSION ${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_BUILD}
DESCRIPTION "Bitcoin client software"
HOMEPAGE_URL "https://bitcoincore.org/"
LANGUAGES CXX ASM
)

set(PACKAGE_NAME "Bitcoin Core")
set(CLIENT_VERSION_IS_RELEASE "false")
set(COPYRIGHT_YEAR "2024")
set(PACKAGE_VERSION ${PROJECT_VERSION})
if(CLIENT_VERSION_RC GREATER 0)
string(APPEND PACKAGE_VERSION "rc${CLIENT_VERSION_RC}")
endif()

set(COPYRIGHT_HOLDERS "The %s developers")
set(COPYRIGHT_HOLDERS_FINAL "The ${PACKAGE_NAME} developers")
set(PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues")
Expand Down
12 changes: 6 additions & 6 deletions cmake/bitcoin-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
#cmakedefine CHAR_EQUALS_INT8 1

/* Version Build */
#define CLIENT_VERSION_BUILD @PROJECT_VERSION_PATCH@
#define CLIENT_VERSION_BUILD @CLIENT_VERSION_BUILD@

/* Version is release */
#define CLIENT_VERSION_IS_RELEASE @CLIENT_VERSION_IS_RELEASE@

/* Major version */
#define CLIENT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define CLIENT_VERSION_MAJOR @CLIENT_VERSION_MAJOR@

/* Minor version */
#define CLIENT_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define CLIENT_VERSION_MINOR @CLIENT_VERSION_MINOR@

/* Copyright holder(s) before %s replacement */
#define COPYRIGHT_HOLDERS "@COPYRIGHT_HOLDERS@"
Expand All @@ -28,7 +28,7 @@
#define COPYRIGHT_HOLDERS_FINAL "@COPYRIGHT_HOLDERS_FINAL@"

/* Replacement for %s in copyright holders string */
#define COPYRIGHT_HOLDERS_SUBSTITUTION "@PROJECT_NAME@"
#define COPYRIGHT_HOLDERS_SUBSTITUTION "@PACKAGE_NAME@"

/* Copyright year */
#define COPYRIGHT_YEAR @COPYRIGHT_YEAR@
Expand Down Expand Up @@ -191,13 +191,13 @@
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"

/* Define to the full name of this package. */
#define PACKAGE_NAME "@PROJECT_NAME@"
#define PACKAGE_NAME "@PACKAGE_NAME@"

/* Define to the home page for this package. */
#define PACKAGE_URL "@PROJECT_HOMEPAGE_URL@"

/* Define to the version of this package. */
#define PACKAGE_VERSION "@PROJECT_VERSION@"
#define PACKAGE_VERSION "@PACKAGE_VERSION@"

/* Define to 1 if strerror_r returns char *. */
#cmakedefine STRERROR_R_CHAR_P 1
Expand Down
4 changes: 0 additions & 4 deletions cmake/module/GenerateSetupNsi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
function(generate_setup_nsi)
set(abs_top_srcdir ${PROJECT_SOURCE_DIR})
set(abs_top_builddir ${PROJECT_BINARY_DIR})
set(PACKAGE_VERSION ${PROJECT_VERSION})
set(CLIENT_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CLIENT_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CLIENT_VERSION_BUILD ${PROJECT_VERSION_PATCH})
set(PACKAGE_URL ${PROJECT_HOMEPAGE_URL})
set(PACKAGE_TARNAME "bitcoin")
set(BITCOIN_GUI_NAME "bitcoin-qt")
Expand Down

0 comments on commit 77aa550

Please sign in to comment.