Skip to content

chore(cli): rename build options to ephemeral parameters in cli #15030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 0 additions & 1 deletion cli/parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func (wpf *workspaceParameterFlags) cliEphemeralParameters() []serpent.Option {
Env: "CODER_BUILD_OPTION",
Description: `Build option value in the format "name=value".`,
UseInstead: []serpent.Option{{Flag: "ephemeral-parameter"}},
Hidden: true,
Value: serpent.StringArrayOf(&wpf.ephemeralParameters),
},
// Deprecated - replaced with prompt-ephemeral-parameters
Expand Down
8 changes: 8 additions & 0 deletions cli/testdata/coder_restart_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@ OPTIONS:

--build-option string-array, $CODER_BUILD_OPTION
Build option value in the format "name=value".
DEPRECATED: Use --ephemeral-parameter instead.

--build-options bool
Prompt for one-time build options defined with ephemeral parameters.
DEPRECATED: Use --prompt-ephemeral-parameters instead.

--ephemeral-parameter string-array, $CODER_EPHEMERAL_PARAMETER
Define ephemeral parameters in the format "name=value".

--parameter string-array, $CODER_RICH_PARAMETER
Rich parameter value in the format "name=value".

--parameter-default string-array, $CODER_RICH_PARAMETER_DEFAULT
Rich parameter default values in the format "name=value".

--prompt-ephemeral-parameters bool, $CODER_PROMPT_EPHEMERAL_PARAMETERS
Prompt for values of ephemeral parameters described in the template.

--rich-parameter-file string, $CODER_RICH_PARAMETER_FILE
Specify a file path with values for rich parameters defined in the
template. The file should be in YAML format, containing key-value
Expand Down
8 changes: 8 additions & 0 deletions cli/testdata/coder_start_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@ OPTIONS:

--build-option string-array, $CODER_BUILD_OPTION
Build option value in the format "name=value".
DEPRECATED: Use --ephemeral-parameter instead.

--build-options bool
Prompt for one-time build options defined with ephemeral parameters.
DEPRECATED: Use --prompt-ephemeral-parameters instead.

--ephemeral-parameter string-array, $CODER_EPHEMERAL_PARAMETER
Define ephemeral parameters in the format "name=value".

--parameter string-array, $CODER_RICH_PARAMETER
Rich parameter value in the format "name=value".

--parameter-default string-array, $CODER_RICH_PARAMETER_DEFAULT
Rich parameter default values in the format "name=value".

--prompt-ephemeral-parameters bool, $CODER_PROMPT_EPHEMERAL_PARAMETERS
Prompt for values of ephemeral parameters described in the template.

--rich-parameter-file string, $CODER_RICH_PARAMETER_FILE
Specify a file path with values for rich parameters defined in the
template. The file should be in YAML format, containing key-value
Expand Down
8 changes: 8 additions & 0 deletions cli/testdata/coder_update_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,24 @@ OPTIONS:

--build-option string-array, $CODER_BUILD_OPTION
Build option value in the format "name=value".
DEPRECATED: Use --ephemeral-parameter instead.

--build-options bool
Prompt for one-time build options defined with ephemeral parameters.
DEPRECATED: Use --prompt-ephemeral-parameters instead.

--ephemeral-parameter string-array, $CODER_EPHEMERAL_PARAMETER
Define ephemeral parameters in the format "name=value".

--parameter string-array, $CODER_RICH_PARAMETER
Rich parameter value in the format "name=value".

--parameter-default string-array, $CODER_RICH_PARAMETER_DEFAULT
Rich parameter default values in the format "name=value".

--prompt-ephemeral-parameters bool, $CODER_PROMPT_EPHEMERAL_PARAMETERS
Prompt for values of ephemeral parameters described in the template.

--rich-parameter-file string, $CODER_RICH_PARAMETER_FILE
Specify a file path with values for rich parameters defined in the
template. The file should be in YAML format, containing key-value
Expand Down
2 changes: 1 addition & 1 deletion cli/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (r *RootCmd) update() *serpent.Command {
return err
}
if !workspace.Outdated && !parameterFlags.promptRichParameters && !parameterFlags.promptEphemeralParameters && len(parameterFlags.ephemeralParameters) == 0 {
_, _ = fmt.Fprintf(inv.Stdout, "Workspace isn't outdated!\n")
_, _ = fmt.Fprintf(inv.Stdout, "Workspace is up-to-date.\n")
return nil
}

Expand Down
18 changes: 18 additions & 0 deletions docs/reference/cli/restart.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions docs/reference/cli/start.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions docs/reference/cli/update.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading