Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 23ac3dc

Browse files
authored
Merge pull request #112 from mnottale/cli-help-gareth
cmd: Change help messages according to @garethr's suggestions.
2 parents 76c1cce + 00648af commit 23ac3dc

File tree

6 files changed

+16
-34
lines changed

6 files changed

+16
-34
lines changed

cmd/deploy.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ import (
1313
// deployCmd represents the deploy command
1414
var deployCmd = &cobra.Command{
1515
Use: "deploy [<app-name>]",
16-
Short: "Deploy the specified app on the connected cluster",
17-
Long: `Deploy the application on either swarm or kubernetes.
18-
The app's docker-compose.yml is first rendered as per the render sub-command, and
19-
then deployed similarly to 'docker stack deploy'.`,
20-
Args: cli.RequiresMaxArgs(1),
16+
Short: "Deploy or update an application",
17+
Long: `Deploy the application on either Swarm or Kubernetes.`,
18+
Args: cli.RequiresMaxArgs(1),
2119
RunE: func(cmd *cobra.Command, args []string) error {
2220
if do, ok := os.LookupEnv("DOCKER_ORCHESTRATOR"); ok {
2321
deployOrchestrator = do

cmd/helm.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ import (
99

1010
var helmCmd = &cobra.Command{
1111
Use: "helm [<app-name>] [-s key=value...] [-f settings-file...]",
12-
Short: "Render the Compose file for this app as an Helm package",
13-
Long: `The helm command creates or updates the directory <app-name>.chart.
14-
- Chart.yaml is created or updated from the app's metadata.
15-
- values.yaml is created or updated with the values from settings which are
16-
actually used by the compose file.
17-
- templates/stack.yaml is created, with a stack template extracted from the app's
18-
docker-compose.yml.`,
19-
Args: cli.RequiresMaxArgs(1),
12+
Short: "Generate a Helm chart",
13+
Long: `Generate a Helm chart for the application.`,
14+
Args: cli.RequiresMaxArgs(1),
2015
RunE: func(cmd *cobra.Command, args []string) error {
2116
d, err := parseSettings(helmEnv)
2217
if err != nil {

cmd/init.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ import (
99
// initCmd represents the init command
1010
var initCmd = &cobra.Command{
1111
Use: "init <app-name> [-c <compose-file>] [-d <description>] [-m name:email ...]",
12-
Short: "Initialize an app package in the current working directory",
13-
Long: `This command initializes a new app package. If the -c option is used, or
14-
if a file named docker-compose.yml is found in the current directory, this file
15-
and the associated .env file if found will be used as the base for this application.`,
16-
Args: cli.ExactArgs(1),
12+
Short: "Start building a Docker application",
13+
Long: `Start building a Docker application. Will automatically detect a docker-compose.yml file in the current directory.`,
14+
Args: cli.ExactArgs(1),
1715
RunE: func(cmd *cobra.Command, args []string) error {
1816
return packager.Init(args[0], initComposeFile, initDescription, initMaintainers)
1917
},

cmd/inspect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// inspectCmd represents the inspect command
1010
var inspectCmd = &cobra.Command{
1111
Use: "inspect [<app-name>]",
12-
Short: "Shows metadata and settings for a given app package",
12+
Short: "Shows metadata and settings for a given application",
1313
Args: cli.RequiresMaxArgs(1),
1414
RunE: func(cmd *cobra.Command, args []string) error {
1515
return renderer.Inspect(firstOrEmpty(args))

cmd/render.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@ import (
1313

1414
var renderCmd = &cobra.Command{
1515
Use: "render <app-name> [-s key=value...] [-f settings-file...]",
16-
Short: "Render the Compose file for this app",
17-
Long: `Render generates a Compose file from the application's template and optional additional files.
18-
Override is provided in different ways:
19-
- External YAML settings files can be specified with the -f flag. All settings
20-
files are merged in order, the app's settings coming first.
21-
- Individual settings values can be passed directly on the command line with the
22-
-s flag. These value takes precedence over all settings files.
23-
`,
24-
Args: cli.RequiresMaxArgs(1),
16+
Short: "Render the Compose file for the application",
17+
Long: `Render the Compose file for the application.`,
18+
Args: cli.RequiresMaxArgs(1),
2519
RunE: func(cmd *cobra.Command, args []string) error {
2620
d, err := parseSettings(renderEnv)
2721
if err != nil {

cmd/root.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ import (
1212

1313
// rootCmd represents the base command when called without any subcommands
1414
var rootCmd = &cobra.Command{
15-
Use: "docker-app",
16-
Short: "Docker App Packages",
17-
Long: `Create, render deploy and otherwise manipulate an app package.
18-
For most sub-commands that take an app-package as only positional argument, this
19-
argument is optional: an app package is looked for in the current working directory.
20-
All commands accept both compressed and uncompressed app packages.`,
15+
Use: "docker-app",
16+
Short: "Docker App Packages",
17+
Long: `Build and deploy Docker applications.`,
2118
SilenceUsage: true,
2219
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
2320
if internal.Debug {

0 commit comments

Comments
 (0)