From c33782561a99559ad9642e5d661020c87c38aaef Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 15 Dec 2021 15:20:55 -0300 Subject: [PATCH] docs: update help after cobra upgrade Signed-off-by: Carlos A Becker --- internal/cmd/docs.go | 2 +- internal/cmd/init.go | 2 +- internal/cmd/package.go | 2 +- internal/cmd/root.go | 2 +- internal/cmd/schema.go | 2 +- scripts/cmd_docs.sh | 4 ---- www/docs/cmd/nfpm.md | 2 +- www/docs/cmd/nfpm_completion.md | 11 +++++------ www/docs/cmd/nfpm_completion_bash.md | 7 +++---- www/docs/cmd/nfpm_completion_fish.md | 5 ++--- www/docs/cmd/nfpm_completion_powershell.md | 5 ++--- www/docs/cmd/nfpm_completion_zsh.md | 5 ++--- www/docs/static/schema.json | 16 ++++++++++++++++ 13 files changed, 36 insertions(+), 29 deletions(-) diff --git a/internal/cmd/docs.go b/internal/cmd/docs.go index 70a20f4..64cd516 100644 --- a/internal/cmd/docs.go +++ b/internal/cmd/docs.go @@ -15,7 +15,7 @@ func newDocsCmd() *docsCmd { root := &docsCmd{} cmd := &cobra.Command{ Use: "docs", - Short: "generates nFPM's command line docs", + Short: "Generates nFPM's command line docs", SilenceUsage: true, DisableFlagsInUseLine: true, Hidden: true, diff --git a/internal/cmd/init.go b/internal/cmd/init.go index 8a37e6c..c32d144 100644 --- a/internal/cmd/init.go +++ b/internal/cmd/init.go @@ -17,7 +17,7 @@ func newInitCmd() *initCmd { cmd := &cobra.Command{ Use: "init", Aliases: []string{"i"}, - Short: "creates a sample nfpm.yaml config file", + Short: "Creates a sample nfpm.yaml config file", SilenceUsage: true, SilenceErrors: true, Args: cobra.NoArgs, diff --git a/internal/cmd/package.go b/internal/cmd/package.go index 24a4521..2dd73f4 100644 --- a/internal/cmd/package.go +++ b/internal/cmd/package.go @@ -23,7 +23,7 @@ func newPackageCmd() *packageCmd { cmd := &cobra.Command{ Use: "package", Aliases: []string{"pkg", "p"}, - Short: "creates a package based on the given the given config file and flags", + Short: "Creates a package based on the given the given config file and flags", SilenceUsage: true, SilenceErrors: true, Args: cobra.NoArgs, diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 59192b6..0c2ff08 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -34,7 +34,7 @@ func newRootCmd(version string, exit func(int)) *rootCmd { } cmd := &cobra.Command{ Use: "nfpm", - Short: "packages apps on RPM, Deb and APK formats based on a YAML configuration file", + Short: "Packages apps on RPM, Deb and APK formats based on a YAML configuration file", Long: `nFPM is a simple, 0-dependencies, deb, rpm and apk packager.`, Version: version, SilenceUsage: true, diff --git a/internal/cmd/schema.go b/internal/cmd/schema.go index 8b670ef..268f2f7 100644 --- a/internal/cmd/schema.go +++ b/internal/cmd/schema.go @@ -21,7 +21,7 @@ func newSchemaCmd() *schemaCmd { cmd := &cobra.Command{ Use: "jsonschema", Aliases: []string{"schema"}, - Short: "outputs nFPM's JSON schema", + Short: "Outputs nFPM's JSON schema", SilenceUsage: true, SilenceErrors: true, Args: cobra.NoArgs, diff --git a/scripts/cmd_docs.sh b/scripts/cmd_docs.sh index dae7f27..e942e46 100755 --- a/scripts/cmd_docs.sh +++ b/scripts/cmd_docs.sh @@ -9,7 +9,6 @@ fi rm -rf www/docs/cmd/*.md git checkout -- go.* -go mod edit -replace github.com/spf13/cobra=github.com/caarlos0/cobra@completions-md go mod tidy go run ./cmd/nfpm docs go run ./cmd/nfpm schema -o ./www/docs/static/schema.json @@ -22,6 +21,3 @@ go run ./cmd/nfpm schema -o ./www/docs/static/schema.json -e 's/^#### /### /g' \ -e 's/^##### /#### /g' \ ./www/docs/cmd/*.md - - -git checkout -- go.* diff --git a/www/docs/cmd/nfpm.md b/www/docs/cmd/nfpm.md index 672538b..4e39eb9 100644 --- a/www/docs/cmd/nfpm.md +++ b/www/docs/cmd/nfpm.md @@ -14,7 +14,7 @@ nFPM is a simple, 0-dependencies, deb, rpm and apk packager. ## See also -* [nfpm completion](/cmd/nfpm_completion/) - generate the autocompletion script for the specified shell +* [nfpm completion](/cmd/nfpm_completion/) - Generate the autocompletion script for the specified shell * [nfpm init](/cmd/nfpm_init/) - creates a sample nfpm.yaml config file * [nfpm jsonschema](/cmd/nfpm_jsonschema/) - outputs nFPM's JSON schema * [nfpm package](/cmd/nfpm_package/) - creates a package based on the given the given config file and flags diff --git a/www/docs/cmd/nfpm_completion.md b/www/docs/cmd/nfpm_completion.md index 1b5681d..3e9c001 100644 --- a/www/docs/cmd/nfpm_completion.md +++ b/www/docs/cmd/nfpm_completion.md @@ -1,10 +1,9 @@ # nfpm completion -generate the autocompletion script for the specified shell +Generate the autocompletion script for the specified shell ## Synopsis - Generate the autocompletion script for nfpm for the specified shell. See each sub-command's help for details on how to use the generated script. @@ -18,8 +17,8 @@ See each sub-command's help for details on how to use the generated script. ## See also * [nfpm](/cmd/nfpm/) - packages apps on RPM, Deb and APK formats based on a YAML configuration file -* [nfpm completion bash](/cmd/nfpm_completion_bash/) - generate the autocompletion script for bash -* [nfpm completion fish](/cmd/nfpm_completion_fish/) - generate the autocompletion script for fish -* [nfpm completion powershell](/cmd/nfpm_completion_powershell/) - generate the autocompletion script for powershell -* [nfpm completion zsh](/cmd/nfpm_completion_zsh/) - generate the autocompletion script for zsh +* [nfpm completion bash](/cmd/nfpm_completion_bash/) - Generate the autocompletion script for bash +* [nfpm completion fish](/cmd/nfpm_completion_fish/) - Generate the autocompletion script for fish +* [nfpm completion powershell](/cmd/nfpm_completion_powershell/) - Generate the autocompletion script for powershell +* [nfpm completion zsh](/cmd/nfpm_completion_zsh/) - Generate the autocompletion script for zsh diff --git a/www/docs/cmd/nfpm_completion_bash.md b/www/docs/cmd/nfpm_completion_bash.md index 6275dba..49dabd6 100644 --- a/www/docs/cmd/nfpm_completion_bash.md +++ b/www/docs/cmd/nfpm_completion_bash.md @@ -1,10 +1,9 @@ # nfpm completion bash -generate the autocompletion script for bash +Generate the autocompletion script for bash ## Synopsis - Generate the autocompletion script for the bash shell. This script depends on the 'bash-completion' package. @@ -25,7 +24,7 @@ To load completions for every new session, execute once: nfpm completion bash > /usr/local/etc/bash_completion.d/nfpm You will need to start a new shell for this setup to take effect. - + ``` nfpm completion bash @@ -40,5 +39,5 @@ nfpm completion bash ## See also -* [nfpm completion](/cmd/nfpm_completion/) - generate the autocompletion script for the specified shell +* [nfpm completion](/cmd/nfpm_completion/) - Generate the autocompletion script for the specified shell diff --git a/www/docs/cmd/nfpm_completion_fish.md b/www/docs/cmd/nfpm_completion_fish.md index 493d10c..dae8b4f 100644 --- a/www/docs/cmd/nfpm_completion_fish.md +++ b/www/docs/cmd/nfpm_completion_fish.md @@ -1,10 +1,9 @@ # nfpm completion fish -generate the autocompletion script for fish +Generate the autocompletion script for fish ## Synopsis - Generate the autocompletion script for the fish shell. To load completions in your current shell session: @@ -31,5 +30,5 @@ nfpm completion fish [flags] ## See also -* [nfpm completion](/cmd/nfpm_completion/) - generate the autocompletion script for the specified shell +* [nfpm completion](/cmd/nfpm_completion/) - Generate the autocompletion script for the specified shell diff --git a/www/docs/cmd/nfpm_completion_powershell.md b/www/docs/cmd/nfpm_completion_powershell.md index 5244e1e..2fad3ad 100644 --- a/www/docs/cmd/nfpm_completion_powershell.md +++ b/www/docs/cmd/nfpm_completion_powershell.md @@ -1,10 +1,9 @@ # nfpm completion powershell -generate the autocompletion script for powershell +Generate the autocompletion script for powershell ## Synopsis - Generate the autocompletion script for powershell. To load completions in your current shell session: @@ -28,5 +27,5 @@ nfpm completion powershell [flags] ## See also -* [nfpm completion](/cmd/nfpm_completion/) - generate the autocompletion script for the specified shell +* [nfpm completion](/cmd/nfpm_completion/) - Generate the autocompletion script for the specified shell diff --git a/www/docs/cmd/nfpm_completion_zsh.md b/www/docs/cmd/nfpm_completion_zsh.md index e622dfb..832f511 100644 --- a/www/docs/cmd/nfpm_completion_zsh.md +++ b/www/docs/cmd/nfpm_completion_zsh.md @@ -1,10 +1,9 @@ # nfpm completion zsh -generate the autocompletion script for zsh +Generate the autocompletion script for zsh ## Synopsis - Generate the autocompletion script for the zsh shell. If shell completion is not already enabled in your environment you will need @@ -38,5 +37,5 @@ nfpm completion zsh [flags] ## See also -* [nfpm completion](/cmd/nfpm_completion/) - generate the autocompletion script for the specified shell +* [nfpm completion](/cmd/nfpm_completion/) - Generate the autocompletion script for the specified shell diff --git a/www/docs/static/schema.json b/www/docs/static/schema.json index d1e37e7..49922ba 100644 --- a/www/docs/static/schema.json +++ b/www/docs/static/schema.json @@ -5,6 +5,10 @@ "definitions": { "APK": { "properties": { + "arch": { + "type": "string", + "title": "architecture in apk nomenclature" + }, "signature": { "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/APKSignature", @@ -327,6 +331,10 @@ }, "Deb": { "properties": { + "arch": { + "type": "string", + "title": "architecture in deb nomenclature" + }, "scripts": { "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/DebScripts", @@ -539,6 +547,10 @@ }, "RPM": { "properties": { + "arch": { + "type": "string", + "title": "architecture in rpm nomenclature" + }, "scripts": { "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/RPMScripts", @@ -569,6 +581,10 @@ "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/RPMSignature", "title": "rpm signature" + }, + "packager": { + "type": "string", + "title": "organization that actually packaged the software" } }, "additionalProperties": false,