HomePhabricator

refactor: Cleanup clientversion.cpp

Description

refactor: Cleanup clientversion.cpp

Summary:

Drop unused CLIENT_VERSION_SUFFIX macro

scripted-diff: Rename share/genbuild.sh macros to more meaningful ones

-BEGIN VERIFY SCRIPT-
sed -i 's/\bDESC\b/GIT_TAG/' share/genbuild.sh
sed -i 's/\bSUFFIX\b/GIT_COMMIT/g' share/genbuild.sh
-END VERIFY SCRIPT-

build: Rename BUILD_* macros and the code self-descriptive

refactor: Remove duplicated code

Drop unused GIT_COMMIT_DATE macro

This is a backport of Core PR18616

Test Plan:

grep -r CLIENT_VERSION_SUFFIX src/
grep -r GIT_COMMIT_DATE src/
mkdir build
cd build
cmake .. -GNinja
ninja all check-all

Testing the version number:
cmake .. -GNinja && ninja && src/bitcoind -h | grep version
It should display something like v0.22.13-ba26a24e0 or v0.22.13-ba26a24e0-dirty (dirty tree)

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9099

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Jan 28 2021, 16:58
PiRKCommitted on Jan 28 2021, 17:05
abc-botPushed on Jan 28 2021, 17:05
Reviewer
Restricted Project
Differential Revision
D9099: refactor: Cleanup clientversion.cpp
Parents
rABCb3681986e349: miner: Avoid stack-use-after-return in validationinterface
Branches
Unknown
Tags
Unknown