Page MenuHomePhabricator

[CMAKE] Make the doc-rpc target actually generate the rpc docs
ClosedPublic

Authored by Fabien on Sep 9 2020, 10:16.

Details

Summary

The current target runs the go script, which is not enough to generate
the docs. It also requires a bitcoind instance running on regtest, and
the user has to go through the logic of starting the server, running the
target and shutting down the server.
This diff scripts this process so that the doc-rpc target handles all
of this and actually generates the RPC docs.

Test Plan
ninja doc-rpc

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Sep 9 2020, 10:16
deadalnix requested changes to this revision.Sep 9 2020, 12:26
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
cmake/utils/gen-rpc-docs.sh
9 ↗(On Diff #23410)

I don't think this belongs here. There is nothing generic about this.

This revision now requires changes to proceed.Sep 9 2020, 12:26

Move the script to better place since it's not a cmake util

This revision is now accepted and ready to land.Sep 9 2020, 13:17
jasonbcox requested changes to this revision.Sep 9 2020, 20:54
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
contrib/teamcity/build-configurations.yml
124 ↗(On Diff #23414)

This file should be removed, right?

This revision now requires changes to proceed.Sep 9 2020, 20:54

Remove the now useless build script

jasonbcox requested changes to this revision.Sep 9 2020, 21:03
jasonbcox added inline comments.
doc/rpc/gen-rpc-docs.sh
18 ↗(On Diff #23420)

Any failure from this point onward will leaving a dangling bitcoind daemon running. You need to cleanup the bitcoind instance according to BITCOIND_PID_FILE using a trap on EXIT.

21 ↗(On Diff #23420)

remove

This revision now requires changes to proceed.Sep 9 2020, 21:03

Use a trap, removed dandling comment

This revision is now accepted and ready to land.Sep 9 2020, 21:47