Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ last entry in the current version
Alternatively, you can start a new version indicating the specific version, or if it should
be the next major, minor or patch version.


### `elastic-package check`

_Context: package_
Expand Down Expand Up @@ -273,25 +272,25 @@ User profiles are not overwritten on upgrade of elastic-stack, and can be freely

_Context: global_


Create a new profile.

### `elastic-package profiles delete`

_Context: global_


Delete a profile.

### `elastic-package profiles list`

_Context: global_


List available profiles.

### `elastic-package profiles use`

_Context: global_


Sets the profile to use when no other is specified.

### `elastic-package promote`

Expand Down Expand Up @@ -343,7 +342,7 @@ The command manages lifecycle of the service stack defined for the package ("_de

_Context: package_


Boot up the stack.

### `elastic-package stack`

Expand All @@ -359,25 +358,25 @@ For details on how to connect the service with the Elastic stack, see the [servi

_Context: global_


Take down the stack.

### `elastic-package stack dump`

_Context: global_


Dump stack data for debug purposes.

### `elastic-package stack shellinit`

_Context: global_


Export environment variables.

### `elastic-package stack status`

_Context: global_


Show status of the stack services.

### `elastic-package stack up`

Expand All @@ -397,7 +396,7 @@ For details on how to connect the service with the Elastic stack, see the [servi

_Context: global_


Update the stack to the most recent versions.

### `elastic-package status [package]`

Expand Down
3 changes: 1 addition & 2 deletions cmd/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ The entry added will include the given description, type and link. It is added o
last entry in the current version

Alternatively, you can start a new version indicating the specific version, or if it should
be the next major, minor or patch version.
`
be the next major, minor or patch version.`

func setupChangelogCommand() *cobraext.Command {
addChangelogCmd := &cobra.Command{
Expand Down
15 changes: 11 additions & 4 deletions tools/readme/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,18 @@ func generateCommandsDoc(cmdTmpl *template.Template, subCommandTemplate *templat
}
for _, subCommand := range cmd.Commands() {
log.Printf("generating command doc for %s %s...\n", cmd.Name(), subCommand.Name())
description := subCommand.Long
if description == "" {
description = subCommand.Short
}
if !strings.HasSuffix(strings.TrimSpace(description), ".") {
description = description + "."
}
templateData := map[string]any{
"CmdName": cmd.Name(),
"SubCmdName": subCommand.Name(),
"Context": cmd.Context(),
"Long": subCommand.Long,
"CmdName": cmd.Name(),
"SubCmdName": subCommand.Name(),
"Context": cmd.Context(),
"Description": description,
}
if err := subCommandTemplate.Execute(&cmdsDoc, templateData); err != nil {
log.Fatal(errors.Wrapf(err, "writing documentation for command '%s %s' failed", cmd.Name(), subCommand.Name()))
Expand Down
2 changes: 1 addition & 1 deletion tools/readme/subcmd.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

_Context: {{.Context}}_

{{.Long}}
{{.Description}}