File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ func (r *RootCmd) templatePush() *clibase.Cmd {
163
163
provisionerTags []string
164
164
uploadFlags templateUploadFlags
165
165
activate bool
166
+ create bool
166
167
)
167
168
client := new (codersdk.Client )
168
169
cmd := & clibase.Cmd {
@@ -290,6 +291,12 @@ func (r *RootCmd) templatePush() *clibase.Cmd {
290
291
Default : "true" ,
291
292
Value : clibase .BoolOf (& activate ),
292
293
},
294
+ {
295
+ Flag : "create" ,
296
+ Description : "Create the template if it does not exist." ,
297
+ Default : "false" ,
298
+ Value : clibase .BoolOf (& create ),
299
+ },
293
300
cliui .SkipPromptOption (),
294
301
}
295
302
cmd .Options = append (cmd .Options , uploadFlags .options ()... )
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ Push a new template version from the current directory or as specified by flag
10
10
Always prompt all parameters. Does not pull parameter values from
11
11
active template version.
12
12
13
+ --create bool (default: false)
14
+ Create the template if it does not exist.
15
+
13
16
-d, --directory string (default: .)
14
17
Specify the directory to create from, use '-' to read tar from stdin.
15
18
Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ Whether the new template will be marked active.
29
29
30
30
Always prompt all parameters. Does not pull parameter values from active template version.
31
31
32
+ ### --create
33
+
34
+ | | |
35
+ | ------- | ------------------ |
36
+ | Type | <code >bool</code > |
37
+ | Default | <code >false</code > |
38
+
39
+ Create the template if it does not exist.
40
+
32
41
### -d, --directory
33
42
34
43
| | |
You can’t perform that action at this time.
0 commit comments