Page MenuHomePhabricator

refactor: Cleanup clientversion.cpp
ClosedPublic

Authored by PiRK on Jan 28 2021, 10:48.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC67d04b398ced: 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)

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jan 28 2021, 10:49
Fabien requested changes to this revision.Jan 28 2021, 13:26
Fabien added a subscriber: Fabien.

The test plan is incomplete. This changes the way the version number is computed, so you need to check that

This revision now requires changes to proceed.Jan 28 2021, 13:26

remove the CLIENT_VERSION_BUILD part that is not used for ABC

Update the test plan

@bot gitian-linux gitian-osx gitian-win

This revision is now accepted and ready to land.Jan 28 2021, 16:41