Skip to content

Commit

Permalink
docs: update help after cobra upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Dec 15, 2021
1 parent 7763be8 commit c337825
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 29 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions scripts/cmd_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.*
2 changes: 1 addition & 1 deletion www/docs/cmd/nfpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions www/docs/cmd/nfpm_completion.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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

7 changes: 3 additions & 4 deletions www/docs/cmd/nfpm_completion_bash.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand All @@ -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

5 changes: 2 additions & 3 deletions www/docs/cmd/nfpm_completion_fish.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

5 changes: 2 additions & 3 deletions www/docs/cmd/nfpm_completion_powershell.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

5 changes: 2 additions & 3 deletions www/docs/cmd/nfpm_completion_zsh.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

16 changes: 16 additions & 0 deletions www/docs/static/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c337825

Please sign in to comment.