From 867b8c847db79b5c6e6084cdfc762c5212ced6b6 Mon Sep 17 00:00:00 2001 From: Yihuang Yu Date: Fri, 17 May 2024 12:30:20 +0800 Subject: [PATCH] docs: Disable "version" option for subcommands Subcommands don't have their own versions, so disable the "version" option. Signed-off-by: Yihuang Yu --- docs/src/man/bootc-edit.md | 6 +----- docs/src/man/bootc-install-print-configuration.md | 5 ----- docs/src/man/bootc-install-to-disk.md | 7 +------ docs/src/man/bootc-install-to-existing-root.md | 6 +----- docs/src/man/bootc-install-to-filesystem.md | 6 +----- docs/src/man/bootc-install.md | 7 +------ docs/src/man/bootc-rollback.md | 6 +----- docs/src/man/bootc-status.md | 6 +----- docs/src/man/bootc-switch.md | 7 +------ docs/src/man/bootc-upgrade.md | 6 +----- docs/src/man/bootc-usr-overlay.md | 6 +----- lib/src/docgen.rs | 3 ++- 12 files changed, 12 insertions(+), 59 deletions(-) diff --git a/docs/src/man/bootc-edit.md b/docs/src/man/bootc-edit.md index 2dd8c5706..2d2bb4867 100644 --- a/docs/src/man/bootc-edit.md +++ b/docs/src/man/bootc-edit.md @@ -5,7 +5,7 @@ bootc-edit - Apply full changes to the host specification # SYNOPSIS **bootc edit** \[**-f**\|**\--filename**\] \[**\--quiet**\] -\[**-h**\|**\--help**\] \[**-V**\|**\--version**\] +\[**-h**\|**\--help**\] # DESCRIPTION @@ -34,10 +34,6 @@ Only changes to the \`spec\` section are honored. : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - # VERSION v0.1.11 diff --git a/docs/src/man/bootc-install-print-configuration.md b/docs/src/man/bootc-install-print-configuration.md index 9ba06d66f..db6da67df 100644 --- a/docs/src/man/bootc-install-print-configuration.md +++ b/docs/src/man/bootc-install-print-configuration.md @@ -8,7 +8,6 @@ processes using \`install to-filesystem\` that want to honor e.g. # SYNOPSIS **bootc install print-configuration** \[**-h**\|**\--help**\] -\[**-V**\|**\--version**\] # DESCRIPTION @@ -25,10 +24,6 @@ string-valued filesystem name suitable for passing to \`mkfs.\$type\`. : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - # VERSION v0.1.11 diff --git a/docs/src/man/bootc-install-to-disk.md b/docs/src/man/bootc-install-to-disk.md index c68080aab..05f75febb 100644 --- a/docs/src/man/bootc-install-to-disk.md +++ b/docs/src/man/bootc-install-to-disk.md @@ -10,8 +10,7 @@ bootc-install-to-disk - Install to the target block device \[**\--enforce-container-sigpolicy**\] \[**\--target-ostree-remote**\] \[**\--skip-fetch-check**\] \[**\--disable-selinux**\] \[**\--karg**\] \[**\--root-ssh-authorized-keys**\] \[**\--generic-image**\] -\[**\--via-loopback**\] \[**-h**\|**\--help**\] -\[**-V**\|**\--version**\] \<*DEVICE*\> +\[**\--via-loopback**\] \[**-h**\|**\--help**\] \<*DEVICE*\> # DESCRIPTION @@ -128,10 +127,6 @@ firmware will be skipped : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - \<*DEVICE*\> : Target block device for installation. The entire device will be diff --git a/docs/src/man/bootc-install-to-existing-root.md b/docs/src/man/bootc-install-to-existing-root.md index 0dbb2b341..cf571a263 100644 --- a/docs/src/man/bootc-install-to-existing-root.md +++ b/docs/src/man/bootc-install-to-existing-root.md @@ -12,7 +12,7 @@ root filesystem \[**\--disable-selinux**\] \[**\--karg**\] \[**\--root-ssh-authorized-keys**\] \[**\--generic-image**\] \[**\--acknowledge-destructive**\] \[**-h**\|**\--help**\] -\[**-V**\|**\--version**\] \[*ROOT_PATH*\] +\[*ROOT_PATH*\] # DESCRIPTION @@ -117,10 +117,6 @@ firmware will be skipped : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - \[*ROOT_PATH*\] \[default: /target\] : Path to the mounted root; its expected to invoke podman with \`-v diff --git a/docs/src/man/bootc-install-to-filesystem.md b/docs/src/man/bootc-install-to-filesystem.md index 63c290eb3..cf915b79e 100644 --- a/docs/src/man/bootc-install-to-filesystem.md +++ b/docs/src/man/bootc-install-to-filesystem.md @@ -12,7 +12,7 @@ bootc-install-to-filesystem - Install to the target filesystem \[**\--target-ostree-remote**\] \[**\--skip-fetch-check**\] \[**\--disable-selinux**\] \[**\--karg**\] \[**\--root-ssh-authorized-keys**\] \[**\--generic-image**\] -\[**-h**\|**\--help**\] \[**-V**\|**\--version**\] \<*ROOT_PATH*\> +\[**-h**\|**\--help**\] \<*ROOT_PATH*\> # DESCRIPTION @@ -140,10 +140,6 @@ firmware will be skipped : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - \<*ROOT_PATH*\> : Path to the mounted root filesystem. diff --git a/docs/src/man/bootc-install.md b/docs/src/man/bootc-install.md index 32f042315..03f71a6bb 100644 --- a/docs/src/man/bootc-install.md +++ b/docs/src/man/bootc-install.md @@ -4,8 +4,7 @@ bootc-install - Install the running container to a target # SYNOPSIS -**bootc install** \[**-h**\|**\--help**\] \[**-V**\|**\--version**\] -\<*subcommands*\> +**bootc install** \[**-h**\|**\--help**\] \<*subcommands*\> # DESCRIPTION @@ -35,10 +34,6 @@ includes other setup and metadata. : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - # SUBCOMMANDS bootc-install-to-disk(8) diff --git a/docs/src/man/bootc-rollback.md b/docs/src/man/bootc-rollback.md index 8454970a2..42bb53631 100644 --- a/docs/src/man/bootc-rollback.md +++ b/docs/src/man/bootc-rollback.md @@ -7,7 +7,7 @@ queued upgrade) then it will be discarded # SYNOPSIS -**bootc rollback** \[**-h**\|**\--help**\] \[**-V**\|**\--version**\] +**bootc rollback** \[**-h**\|**\--help**\] # DESCRIPTION @@ -32,10 +32,6 @@ rollback invocation. : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - # VERSION v0.1.11 diff --git a/docs/src/man/bootc-status.md b/docs/src/man/bootc-status.md index 4af828850..3cc88e496 100644 --- a/docs/src/man/bootc-status.md +++ b/docs/src/man/bootc-status.md @@ -5,7 +5,7 @@ bootc-status - Display status # SYNOPSIS **bootc status** \[**\--json**\] \[**\--booted**\] -\[**-h**\|**\--help**\] \[**-V**\|**\--version**\] +\[**-h**\|**\--help**\] # DESCRIPTION @@ -31,10 +31,6 @@ The exact API format is not currently declared stable. : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - # VERSION v0.1.11 diff --git a/docs/src/man/bootc-switch.md b/docs/src/man/bootc-switch.md index dd1283bce..9f8a9070b 100644 --- a/docs/src/man/bootc-switch.md +++ b/docs/src/man/bootc-switch.md @@ -6,8 +6,7 @@ bootc-switch - Target a new container image reference to boot **bootc switch** \[**\--quiet**\] \[**\--transport**\] \[**\--enforce-container-sigpolicy**\] \[**\--ostree-remote**\] -\[**\--retain**\] \[**-h**\|**\--help**\] \[**-V**\|**\--version**\] -\<*TARGET*\> +\[**\--retain**\] \[**-h**\|**\--help**\] \<*TARGET*\> # DESCRIPTION @@ -55,10 +54,6 @@ includes a default policy which requires signatures. : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - \<*TARGET*\> : Target image to use for the next boot diff --git a/docs/src/man/bootc-upgrade.md b/docs/src/man/bootc-upgrade.md index fd0c34302..908d05f7f 100644 --- a/docs/src/man/bootc-upgrade.md +++ b/docs/src/man/bootc-upgrade.md @@ -5,7 +5,7 @@ bootc-upgrade - Download and queue an updated container image to apply # SYNOPSIS **bootc upgrade** \[**\--quiet**\] \[**\--check**\] \[**\--apply**\] -\[**-h**\|**\--help**\] \[**-V**\|**\--version**\] +\[**-h**\|**\--help**\] # DESCRIPTION @@ -50,10 +50,6 @@ userspace-only restart. : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - # VERSION v0.1.11 diff --git a/docs/src/man/bootc-usr-overlay.md b/docs/src/man/bootc-usr-overlay.md index 055864ad4..07ac8cd24 100644 --- a/docs/src/man/bootc-usr-overlay.md +++ b/docs/src/man/bootc-usr-overlay.md @@ -5,7 +5,7 @@ will be discarded on reboot # SYNOPSIS -**bootc usr-overlay** \[**-h**\|**\--help**\] \[**-V**\|**\--version**\] +**bootc usr-overlay** \[**-h**\|**\--help**\] # DESCRIPTION @@ -37,10 +37,6 @@ unmount\". : Print help (see a summary with -h) -**-V**, **\--version** - -: Print version - # VERSION v0.1.11 diff --git a/lib/src/docgen.rs b/lib/src/docgen.rs index 22beac8a5..06ea39b22 100644 --- a/lib/src/docgen.rs +++ b/lib/src/docgen.rs @@ -46,7 +46,8 @@ fn generate_one(directory: &Utf8Path, cmd: Command) -> Result<()> { .name(subname) .alias(subname) .bin_name(bin_name) - .version(version); + .version(version) + .disable_version_flag(true); generate_one(directory, subcmd.clone().name(subname).version(version))?; } Ok(())