gen-docs

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command gen-docs writes upgradescope's shell completions and man pages, rendered from the same cobra command tree the binary runs, so they cannot drift from its flags. GoReleaser's before hook runs it; the release archives, deb/rpm/apk packages and the Homebrew formula ship the result:

<out>/completions/upgradescope.{bash,zsh,fish,ps1}
<out>/manpages/upgradescope[-<command>...].1.gz

Unlike the other tools/ programs it is part of the main module: it imports internal/cli. It is a separate program rather than a hidden subcommand so the shipped binary does not link the man page renderer.

The man page date is -date (RFC 3339; GoReleaser passes the commit date), else $SOURCE_DATE_EPOCH, else now. Output is byte-for-byte reproducible for a given date: cobra's auto-generated tag is off and the gzip headers carry no timestamp.

go run ./tools/gen-docs -out packaging/generated -date 2026-10-01T12:00:00Z

With -reference it writes the docs site's generated references instead (reference.go): the CLI pages, the ClusterReadiness CRD and the REST API rendered from api/openapi.yaml. They carry no date, so the committed copies can be checked for drift (TestReferenceIsFresh, make docs-check):

go run ./tools/gen-docs -reference docs/reference

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL