Skip to content

Commit 928695b

Browse files
committed
Merge #10155: build: Deduplicate version numbers
9ff7818 doc: Update release process for simplified version bumping (Wladimir J. van der Laan) 08d9aee build: Remove duplicate version information from src/clientversion.h (Wladimir J. van der Laan) 168a703 doc: Make build system insert version in Doxyfile (Wladimir J. van der Laan) b67eb8d doc: Remove version numbers from READMEs (Wladimir J. van der Laan) Tree-SHA512: 531e44282b1c1383a382847a5605177917dfbf78acfaa754d1cbadd2e165c7e34ddbd01790f87615083fac359571708c2551ad24b712aab1f84a2068360c3a17
2 parents a3a2160 + 9ff7818 commit 928695b

File tree

6 files changed

+14
-44
lines changed

6 files changed

+14
-44
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,7 @@ AC_SUBST(QR_LIBS)
11571157
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/functional/config.ini])
11581158
AC_CONFIG_FILES([test/util/buildenv.py],[chmod +x test/util/buildenv.py])
11591159
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
1160+
AC_CONFIG_FILES([doc/Doxyfile])
11601161
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
11611162
AC_CONFIG_LINKS([test/util/bitcoin-util-test.py:test/util/bitcoin-util-test.py])
11621163
AC_CONFIG_LINKS([test/util/bctest.py:test/util/bctest.py])

doc/Doxyfile renamed to doc/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Bitcoin Core"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.14.99
41+
PROJECT_NUMBER = @PACKAGE_VERSION@
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

doc/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Bitcoin Core 0.14.99
2-
=====================
1+
Bitcoin Core
2+
=============
33

44
Setup
55
---------------------

doc/README_windows.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Bitcoin Core 0.14.99
2-
=====================
1+
Bitcoin Core
2+
=============
33

44
Intro
55
-----

doc/release-process.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Before every release candidate:
1010
Before every minor and major release:
1111

1212
* Update [bips.md](bips.md) to account for changes since the last release.
13-
* Update version in sources (see below)
13+
* Update version in `configure.ac` (don't forget to set `CLIENT_VERSION_IS_RELEASE` to `true`)
1414
* Write release notes (see below)
1515
* Update `src/chainparams.cpp` nMinimumChainWork with information from the getblockchaininfo rpc.
1616
* Update `src/chainparams.cpp` defaultAssumeValid with information from the getblockhash rpc.
@@ -24,6 +24,7 @@ Before every major release:
2424
* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example.
2525
* Update [`BLOCK_CHAIN_SIZE`](/src/qt/intro.cpp) to the current size plus some overhead.
2626
* Update `src/chainparams.cpp` chainTxData with statistics about the transaction count and rate.
27+
* Update version of `contrib/gitian-descriptors/*.yml`: usually one'd want to do this on master after branching off the release - but be sure to at least do it before a new major release
2728

2829
### First time / New builders
2930

@@ -37,23 +38,7 @@ Check out the source code in the following directory hierarchy.
3738
git clone https://github.com/devrandom/gitian-builder.git
3839
git clone https://github.com/bitcoin/bitcoin.git
3940

40-
### Bitcoin maintainers/release engineers, update version in sources
41-
42-
Update the following:
43-
44-
- `configure.ac`:
45-
- `_CLIENT_VERSION_MAJOR`
46-
- `_CLIENT_VERSION_MINOR`
47-
- `_CLIENT_VERSION_REVISION`
48-
- Don't forget to set `_CLIENT_VERSION_IS_RELEASE` to `true`
49-
- `src/clientversion.h`: (this mirrors `configure.ac` - see issue #3539)
50-
- `CLIENT_VERSION_MAJOR`
51-
- `CLIENT_VERSION_MINOR`
52-
- `CLIENT_VERSION_REVISION`
53-
- Don't forget to set `CLIENT_VERSION_IS_RELEASE` to `true`
54-
- `doc/README.md` and `doc/README_windows.txt`
55-
- `doc/Doxyfile`: `PROJECT_NUMBER` contains the full version
56-
- `contrib/gitian-descriptors/*.yml`: usually one'd want to do this on master after branching off the release - but be sure to at least do it before a new major release
41+
### Bitcoin maintainers/release engineers, suggestion for writing release notes
5742

5843
Write release notes. git shortlog helps a lot, for example:
5944

src/clientversion.h

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,13 @@
77

88
#if defined(HAVE_CONFIG_H)
99
#include "config/bitcoin-config.h"
10-
#else
11-
12-
/**
13-
* client versioning and copyright year
14-
*/
15-
16-
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
17-
#define CLIENT_VERSION_MAJOR 0
18-
#define CLIENT_VERSION_MINOR 14
19-
#define CLIENT_VERSION_REVISION 99
20-
#define CLIENT_VERSION_BUILD 0
21-
22-
//! Set to true for release, false for prerelease or test build
23-
#define CLIENT_VERSION_IS_RELEASE false
24-
25-
/**
26-
* Copyright year (2009-this)
27-
* Todo: update this when changing our copyright comments in the source
28-
*/
29-
#define COPYRIGHT_YEAR 2017
30-
3110
#endif //HAVE_CONFIG_H
3211

12+
// Check that required client information is defined
13+
#if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || !defined(CLIENT_VERSION_REVISION) || !defined(CLIENT_VERSION_BUILD) || !defined(CLIENT_VERSION_IS_RELEASE) || !defined(COPYRIGHT_YEAR)
14+
#error Client version information missing: wasn't defined by bitcoin-config.h nor defined any other way
15+
#endif
16+
3317
/**
3418
* Converts the parameter X to a string after macro replacement on X has been performed.
3519
* Don't merge these into one macro!

0 commit comments

Comments
 (0)