From 0ddbfd7974c75f5d4e159b7ce9f7ad2aa38460c5 Mon Sep 17 00:00:00 2001 From: chromatic Date: Wed, 14 Dec 2022 22:27:59 -0800 Subject: [PATCH] Add release date and duration constants These constants, when defined at the point of each new release, give us the ability to detect when a running node may be out of date with respect to an expected upcoming release. This is the starting point for adding out-of-date notifications to the daemon, CLI tool, and Qt binary. --- configure.ac | 6 ++++++ doc/release-process.md | 2 ++ 2 files changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 5426db0ee..60679ced0 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,8 @@ define(_CLIENT_VERSION_IS_RELEASE, false) define(_COPYRIGHT_YEAR, 2022) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core and Dogecoin Core]]) +define(_CURRENT_RELEASE_DATE,[[1970-01-01]]) +define(_EXPECTED_DAYS_TO_NEXT_RELEASE,[270]) AC_INIT([Dogecoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/dogecoin/dogecoin/issues],[dogecoin],[https://dogecoin.com/]) AC_CONFIG_SRCDIR([src/validation.cpp]) AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) @@ -1093,6 +1095,8 @@ AC_DEFINE(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS", [Copyright holder(s) before % AC_DEFINE(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION", [Replacement for %s in copyright holders string]) define(_COPYRIGHT_HOLDERS_FINAL, [patsubst(_COPYRIGHT_HOLDERS, [%s], [_COPYRIGHT_HOLDERS_SUBSTITUTION])]) AC_DEFINE(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL", [Copyright holder(s)]) +AC_DEFINE(CURRENT_RELEASE_DATE, "_CURRENT_RELEASE_DATE", [Date of the current release]) +AC_DEFINE(EXPECTED_DAYS_TO_NEXT_RELEASE, _EXPECTED_DAYS_TO_NEXT_RELEASE,[Days until the next release is definitely released]) AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR) AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR) AC_SUBST(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION) @@ -1102,6 +1106,8 @@ AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR) AC_SUBST(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS") AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION") AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL") +AC_SUBST(CURRENT_RELEASE_DATE, "_CURRENT_RELEASE_DATE") +AC_SUBST(EXPECTED_DAYS_TO_NEXT_RELEASE, _EXPECTED_DAYS_TO_NEXT_RELEASE) AC_SUBST(BITCOIN_DAEMON_NAME) AC_SUBST(BITCOIN_GUI_NAME) AC_SUBST(BITCOIN_CLI_NAME) diff --git a/doc/release-process.md b/doc/release-process.md index dc7eeba0f..50d93e6d0 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -44,6 +44,8 @@ Update the following: - `_CLIENT_VERSION_MAJOR` - `_CLIENT_VERSION_MINOR` - `_CLIENT_VERSION_REVISION` + - `_CURRENT_RELEASE_DATE` + - `_EXPECTED_DAYS_TO_NEXT_RELEASE` if necessary - Don't forget to set `_CLIENT_VERSION_IS_RELEASE` to `true` - `src/clientversion.h`: (this mirrors `configure.ac` - see issue #3539) - `CLIENT_VERSION_MAJOR`