Page MenuHomePhabricator

Add a script to update the version number
AbandonedPublic

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

Details

Reviewers
deadalnix
jasonbcox
Mengerian
Group Reviewers
Restricted Project
Summary

This script updates the version in configure.ac, 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/version-update.sh 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

Repository
rABC Bitcoin ABC
Branch
version_script
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4470
Build 7004: Bitcoin ABC Buildbot (legacy)
Build 7003: arc lint + arc unit

Event Timeline

jasonbcox requested changes to this revision.Jan 10 2019, 16:11
jasonbcox added a subscriber: jasonbcox.

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

This revision now requires changes to proceed.Jan 10 2019, 16:11

Update release-process.md, also update gitian files

Fabien edited the test plan for this revision. (Show Details)

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 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 added a reviewer: Mengerian.

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

This comment was removed by Fabien.

There seem to be no good solution here. Generating files such as configure.ac 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.