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.
This commit is contained in:
chromatic 2022-12-14 22:27:59 -08:00
parent 315a84d14c
commit 0ddbfd7974
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -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`