1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-13 11:36:11 +02:00

docs: update help after cobra upgrade

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos A Becker 2021-12-15 15:20:55 -03:00
parent 7763be86dc
commit c33782561a
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
13 changed files with 36 additions and 29 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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.*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

16
www/docs/static/schema.json generated vendored
View File

@ -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,