mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(docs): rework CLI docs (#6312)
This commit is contained in:
+6
-4
@@ -27,8 +27,9 @@ func state() *cobra.Command {
|
||||
func statePull() *cobra.Command {
|
||||
var buildNumber int
|
||||
cmd := &cobra.Command{
|
||||
Use: "pull <workspace> [file]",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Use: "pull <workspace> [file]",
|
||||
Short: "Pull a Terraform state file from a workspace.",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
client, err := CreateClient(cmd)
|
||||
if err != nil {
|
||||
@@ -68,8 +69,9 @@ func statePull() *cobra.Command {
|
||||
func statePush() *cobra.Command {
|
||||
var buildNumber int
|
||||
cmd := &cobra.Command{
|
||||
Use: "push <workspace> <file>",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Use: "push <workspace> <file>",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Short: "Push a Terraform state file to a workspace.",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
client, err := CreateClient(cmd)
|
||||
if err != nil {
|
||||
|
||||
@@ -73,6 +73,7 @@ func TestTemplatePull(t *testing.T) {
|
||||
// and writes it to the correct directory.
|
||||
t.Run("ToDir", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
t.Skip("FLAKE: @ammario to fix imminently")
|
||||
|
||||
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
|
||||
user := coderdtest.CreateFirstUser(t, client)
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ Usage:
|
||||
coder state [command]
|
||||
|
||||
Commands:
|
||||
pull
|
||||
push
|
||||
pull Pull a Terraform state file from a workspace.
|
||||
push Push a Terraform state file to a workspace.
|
||||
|
||||
Flags:
|
||||
-h, --help help for state
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
Pull a Terraform state file from a workspace.
|
||||
|
||||
Usage:
|
||||
coder state pull <workspace> [file] [flags]
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
Push a Terraform state file to a workspace.
|
||||
|
||||
Usage:
|
||||
coder state push <workspace> <file> [flags]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user