Skip to content

Commit

Permalink
improve commands descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pPrecel committed Nov 19, 2023
1 parent 6cad620 commit 2ca1ee5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions cmd/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ func NewComposeCommand(opts *Options) *cli.Command {
}

return &cli.Command{
Name: "compose",
Name: "compose",
Usage: "Generates .diff and report files for many users and based on the .yaml config file",
UsageText: "pkup gen --config .pkupcompose.yaml",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "config",
DefaultText: ".pkupcompose.yaml",
Value: ".pkupcompose.yaml",
Destination: &actionsOpts.config,
Action: func(_ *cli.Context, path string) error {
path, err := filepath.Abs(path)
Expand Down Expand Up @@ -77,6 +79,12 @@ func NewComposeCommand(opts *Options) *cli.Command {
}

func composeCommandAction(ctx *cli.Context, opts *composeActionOpts) error {
opts.Log.Info("generating artifacts for the PKUP period", opts.Log.Args(
"config", opts.config,
"since", opts.since.Value().Local().Format(logTimeFormat),
"until", opts.until.Value().Local().Format(logTimeFormat),
))

cfg, err := compose.ReadConfig(opts.config)
if err != nil {
return fmt.Errorf("failed to read config from path '%s': %s", opts.config, err.Error())
Expand Down
2 changes: 1 addition & 1 deletion cmd/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func genCommandAction(ctx *cli.Context, opts *genActionOpts) error {
warnOnNewRelease(client, opts)
}

log.Info("generating artifacts for the actual PKUP period", log.Args(
log.Info("generating artifacts for the PKUP period", log.Args(
"since", opts.since.Value().Local().Format(logTimeFormat),
"until", opts.until.Value().Local().Format(logTimeFormat),
))
Expand Down

0 comments on commit 2ca1ee5

Please sign in to comment.