Skip to content

feat(cli): support non-active template version pushes #7488

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 10 commits into from
Jun 3, 2023
Prev Previous commit
Next Next commit
Update
  • Loading branch information
goodspark committed May 12, 2023
commit 7e023fb5cc3208c588e5e22b0eb4a2491adac66a
8 changes: 4 additions & 4 deletions cli/templatepush.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (r *RootCmd) templatePush() *clibase.Cmd {
alwaysPrompt bool
provisionerTags []string
uploadFlags templateUploadFlags
makeActive bool
activate bool
)
client := new(codersdk.Client)
cmd := &clibase.Cmd{
Expand Down Expand Up @@ -175,7 +175,7 @@ func (r *RootCmd) templatePush() *clibase.Cmd {
return xerrors.Errorf("job failed: %s", job.Job.Status)
}

if makeActive {
if activate {
err = client.UpdateActiveTemplateVersion(inv.Context(), template.ID, codersdk.UpdateActiveTemplateVersion{
ID: job.ID,
})
Expand Down Expand Up @@ -237,10 +237,10 @@ func (r *RootCmd) templatePush() *clibase.Cmd {
Value: clibase.BoolOf(&alwaysPrompt),
},
{
Flag: "make-active",
Flag: "activate",
Description: "Whether the new template will be marked active.",
Default: "true",
Value: clibase.BoolOf(&makeActive),
Value: clibase.BoolOf(&activate),
},
cliui.SkipPromptOption(),
uploadFlags.option(),
Expand Down