Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
change command to versions list
  • Loading branch information
AbhineetJain committed Jul 25, 2022
commit c9edce3b4743e8c9fb9e9ae7f2a6c561747dacf1
10 changes: 5 additions & 5 deletions cli/templateversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ func templateVersions() *cobra.Command {
Aliases: []string{"version"},
Example: formatExamples(
example{
Description: "Show versions of a specific template",
Command: "coder templates versions show my-template",
Description: "List versions of a specific template",
Command: "coder templates versions list my-template",
},
),
}
cmd.AddCommand(
templateVersionsShow(),
templateVersionsList(),
)

return cmd
}

func templateVersionsShow() *cobra.Command {
func templateVersionsList() *cobra.Command {
return &cobra.Command{
Use: "show <template>",
Use: "list <template>",
Args: cobra.ExactArgs(1),
Short: "List all the versions of the specified template",
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion cli/templateversions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestTemplateVersions(t *testing.T) {
_ = coderdtest.AwaitTemplateVersionJob(t, client, version.ID)
template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID)

cmd, root := clitest.New(t, "templates", "versions", "show", template.Name)
cmd, root := clitest.New(t, "templates", "versions", "list", template.Name)
clitest.SetupConfig(t, client, root)

pty := ptytest.New(t)
Expand Down