You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: commands/apps.go
+115-64
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ func Apps() *Command {
40
40
Use: "apps",
41
41
Aliases: []string{"app", "a"},
42
42
Short: "Display commands for working with apps",
43
-
Long: "The subcommands of `doctl app` manage your App Platform apps.",
43
+
Long: "The subcommands of `doctl app` manage your App Platform apps. For documentation on app specs used by multiple commands, see https://www.digitalocean.com/docs/app-platform/concepts/app-spec.",
44
44
},
45
45
}
46
46
@@ -54,7 +54,7 @@ func Apps() *Command {
54
54
aliasOpt("c"),
55
55
displayerType(&displayers.Apps{}),
56
56
)
57
-
AddStringFlag(create, doctl.ArgAppSpec, "", "", "Path to an app spec in JSON or YAML format. For more information about app specs, see https://www.digitalocean.com/docs/app-platform/concepts/app-spec", requiredOpt())
57
+
AddStringFlag(create, doctl.ArgAppSpec, "", "", `Path to an app spec in JSON or YAML format. Set to "-" to read from stdin.`, requiredOpt())
58
58
59
59
CmdBuilder(
60
60
cmd,
@@ -92,7 +92,7 @@ Only basic information is included with the text output format. For complete app
92
92
aliasOpt("u"),
93
93
displayerType(&displayers.Apps{}),
94
94
)
95
-
AddStringFlag(update, doctl.ArgAppSpec, "", "", "Path to an app spec in JSON or YAML format.", requiredOpt())
95
+
AddStringFlag(update, doctl.ArgAppSpec, "", "", `Path to an app spec in JSON or YAML format. Set to "-" to read from stdin.`, requiredOpt())
96
96
97
97
deleteApp:=CmdBuilder(
98
98
cmd,
@@ -177,6 +177,21 @@ Three types of logs are supported and can be configured with --`+doctl.ArgAppLog
177
177
displayerType(&displayers.AppRegions{}),
178
178
)
179
179
180
+
propose:=CmdBuilder(
181
+
cmd,
182
+
RunAppsPropose,
183
+
"propose",
184
+
"Propose an app spec",
185
+
`Reviews and validates an app specification for a new or existing app. The request returns some information about the proposed app, including app cost and upgrade cost. If an existing app ID is specified, the app spec is treated as a proposed update to the existing app.
186
+
187
+
Only basic information is included with the text output format. For complete app details including an updated app spec, use the JSON format.`,
188
+
Writer,
189
+
aliasOpt("c"),
190
+
displayerType(&displayers.Apps{}),
191
+
)
192
+
AddStringFlag(propose, doctl.ArgAppSpec, "", "", "Path to an app spec in JSON or YAML format. For more information about app specs, see https://www.digitalocean.com/docs/app-platform/concepts/app-spec", requiredOpt())
193
+
AddStringFlag(propose, doctl.ArgApp, "", "", "An optional existing app ID. If specified, the app spec will be treated as a proposed update to the existing app.")
returnnil, fmt.Errorf("Failed to parse app spec: %v", err)
591
+
returnnil, err
546
592
}
547
593
548
594
return&appSpec, nil
@@ -561,11 +607,12 @@ func appsSpec() *Command {
561
607
562
608
Optionally, pass a deployment ID to get the spec of that specific deployment.`, Writer)
563
609
AddStringFlag(getCmd, doctl.ArgAppDeployment, "", "", "optional: a deployment ID")
564
-
AddStringFlag(getCmd, doctl.ArgFormat, "", "yaml", `the format to output the spec as; either "yaml" or "json"`)
610
+
AddStringFlag(getCmd, doctl.ArgFormat, "", "yaml", `the format to output the spec in; either "yaml" or "json"`)
565
611
566
-
CmdBuilder(cmd, RunAppsSpecValidate(os.Stdin), "validate <spec file>", "Validate an application spec", `Use this command to check whether a given app spec (YAML or JSON) is valid.
612
+
validateCmd:=CmdBuilder(cmd, RunAppsSpecValidate, "validate <spec file>", "Validate an application spec", `Use this command to check whether a given app spec (YAML or JSON) is valid.
567
613
568
614
You may pass - as the filename to read from stdin.`, Writer)
615
+
AddBoolFlag(validateCmd, doctl.ArgSchemaOnly, "", false, "Only validate the spec schema and not the correctness of the spec.")
0 commit comments