Page MenuHomePhabricator

Add a script to update the version number

Authored by Fabien on Jan 10 2019, 15:56.


Group Reviewers
Restricted Project

This script updates the version in, CMakeLists.txt,
Doxyfile and gitian-<os>.yml. It copies the release-notes to the archive
folder and creates a new empty one.

Test Plan
./contrib/devtools/ 1.19.7

Check the files are updated accordingly
Try to enter a version with another format and check it returns usage.
Read the release process

Diff Detail

rABC Bitcoin ABC
Lint OK
No Unit Test Coverage
Build Status
Buildable 4470
Build 7004: Bitcoin ABC Teamcity Staging
Build 7003: arc lint + arc unit

Event Timeline

Fabien created this revision.Jan 10 2019, 15:56
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 10 2019, 15:56
Herald added a subscriber: schancel. · View Herald Transcript
jasonbcox requested changes to this revision.Jan 10 2019, 16:11
jasonbcox added a subscriber: jasonbcox.

Please update doc/ so that it's clear to use this script instead of manually.

This revision now requires changes to proceed.Jan 10 2019, 16:11
Fabien updated this revision to Diff 6587.Jan 10 2019, 16:40

Update, also update gitian files

Fabien edited the summary of this revision. (Show Details)Jan 10 2019, 16:41
Fabien edited the test plan for this revision. (Show Details)
Fabien updated this revision to Diff 6588.Jan 10 2019, 16:42

Nit: fix indent in loop

deadalnix requested changes to this revision.Jan 10 2019, 17:13

It's an horrible idea to do it this way IMO. This script should either generate some files which are then included or, better, the version should be sourced from a common source that can updated at once. Doing it this way ensure that any formatting or style change will break everything, silently, and that any new use of the version number will not be updated going forward.

Rationalizing the management of the version is a great idea, but this approach is wrong.

This revision now requires changes to proceed.Jan 10 2019, 17:13
Mengerian accepted this revision.Jan 10 2019, 17:17
Mengerian added a subscriber: Mengerian.
This comment was removed by Mengerian.
Fabien planned changes to this revision.Jan 10 2019, 18:01

I don't know how to remove my previous approval, looks like this should be re-worked.

For what it's worth, I tried out the current version and it worked for various combinations of major/minor/revision numbers, and failed as expected for malformed inputs.

Fabien removed a reviewer: Mengerian.Jan 10 2019, 18:45
Fabien added a reviewer: Mengerian.

@Mengerian I deleted you and re-added to remove your approval ;)

Fabien added a comment.Jan 10 2019, 18:46
This comment was removed by Fabien.
Fabien abandoned this revision.Mar 1 2019, 14:51

There seem to be no good solution here. Generating files such as or CMakeLists.txt will add an undesirable step to the build process, and most test files cannot include from an external source.
At this point updating the values manually is still the easiest way to do.