help text examples + clean up (#2418)

This commit is contained in:
Sebastian Kunert
2023-04-01 16:44:32 +02:00
committed by GitHub
parent a79096f1d2
commit 59fb7ff59c
8 changed files with 59 additions and 10 deletions
+1
View File
@@ -87,6 +87,7 @@ cumulus-client-service = { path = "../client/service" }
cumulus-primitives-core = { path = "../primitives/core" }
cumulus-primitives-parachain-inherent = { path = "../primitives/parachain-inherent" }
cumulus-relay-chain-interface = { path = "../client/relay-chain-interface" }
color-print = "0.3.4"
[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }
+10
View File
@@ -64,12 +64,22 @@ pub enum Subcommand {
TryRuntime,
}
const AFTER_HELP_EXAMPLE: &str = color_print::cstr!(
r#"<bold><underline>Examples:</></>
<bold>polkadot-parachain --chain statemint --sync warp -- --chain polkadot --sync warp</>
Launch a warp-syncing full node of the <italic>statemint</> parachain on the <italic>polkadot</> relay chain.
<bold>polkadot-parachain --chain statemint --sync warp --relay-chain-rpc-url ws://rpc.example.com -- --chain polkadot</>
Launch a warp-syncing full node of the <italic>statemint</> parachain on the <italic>polkadot</> relay chain.
Uses <italic>ws://rpc.example.com</> as remote relay chain node.
"#
);
#[derive(Debug, clap::Parser)]
#[command(
propagate_version = true,
args_conflicts_with_subcommands = true,
subcommand_negates_reqs = true
)]
#[clap(after_help = AFTER_HELP_EXAMPLE)]
pub struct Cli {
#[command(subcommand)]
pub subcommand: Option<Subcommand>,