Skip to content

Commit

Permalink
render -> generate
Browse files Browse the repository at this point in the history
  • Loading branch information
angrycub committed Oct 26, 2023
1 parent 4151510 commit af5ef10
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions internal/cli/generate_varfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type generateVarFileCommand struct {
*baseCommand
packConfig *cache.PackConfig

// renderTo is the path to write rendered var override files to in
// renderTo is the path to write generated var override files to in
// addition to standard output.
renderTo string

Expand Down Expand Up @@ -170,15 +170,15 @@ func (c *generateVarFileCommand) Flags() *flag.Sets {
Name: "registry",
Target: &c.packConfig.Registry,
Default: "",
Usage: `Specific registry name containing the pack to be rendered.
Usage: `Specific registry name containing the target pack.
If not specified, the default registry will be used.`,
})

f.StringVar(&flag.StringVar{
Name: "ref",
Target: &c.packConfig.Ref,
Default: "",
Usage: `Specific git ref of the pack to be rendered.
Usage: `Specific git ref of the target pack.
Supports tags, SHA, and latest. If no ref is specified,
defaults to latest.
Expand All @@ -189,7 +189,7 @@ func (c *generateVarFileCommand) Flags() *flag.Sets {
StringVar: &flag.StringVar{
Name: "to-file",
Target: &c.renderTo,
Usage: `Path to write rendered variable override file to in addition to
Usage: `Path to write generated variable override file to in addition to
standard output.`,
},
Shorthand: "o",
Expand All @@ -209,32 +209,32 @@ func (c *generateVarFileCommand) AutocompleteFlags() complete.Flags {
func (c *generateVarFileCommand) Help() string {

c.Example = `
# Render a variables override file for the given pack to standard output.
# Generate a variables override file for the given pack to standard output.
nomad-pack generate var-file example
# Render a variable override for the example pack, outputting as a file in
# Generate a variable override for the example pack, outputting as a file in
# addition to the terminal.
nomad-pack generate var-file example --to-file ./overrides.hcl
# Render a variable override for the example pack, outputting as a file in
# Generate a variable override for the example pack, outputting as a file in
# addition to the terminal. Setting auto-approve allows the command to
# overwrite existing files.
nomad-pack generate var-file example --to-file ./overrides.hcl --auto-approve
# Render a variable override pack under development from the filesystem -
# Generate a variable override pack under development from the filesystem -
# supports current working directory or relative path
nomad-pack generate var-file .
`

return formatHelp(`
Usage: nomad-pack generate var-file <pack-name> [options]
Render a variables file for the specified Nomad Pack.
Generate a variables file for the specified Nomad Pack.
` + c.GetExample() + c.Flags().Help())
}

// Synopsis satisfies the Synopsis function of the cli.Command interface.
func (c *generateVarFileCommand) Synopsis() string {
return "Render the templates within a pack"
return "Generate a variable override file for a pack"
}

0 comments on commit af5ef10

Please sign in to comment.