Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 5c6af49

Browse files
committed
Unhide rebuild and watch-build commands
1 parent cb3ac49 commit 5c6af49

File tree

4 files changed

+72
-4
lines changed

4 files changed

+72
-4
lines changed

docs/coder_envs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ Perform operations on the Coder environments owned by the active user.
2323

2424
* [coder](coder.md) - coder provides a CLI for working with an existing Coder Enterprise installation
2525
* [coder envs ls](coder_envs_ls.md) - list all environments owned by the active user
26+
* [coder envs rebuild](coder_envs_rebuild.md) - rebuild a Coder environment
2627
* [coder envs stop](coder_envs_stop.md) - stop Coder environments by name
28+
* [coder envs watch-build](coder_envs_watch-build.md) - trail the build log of a Coder environment
2729

docs/coder_envs_rebuild.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## coder envs rebuild
2+
3+
rebuild a Coder environment
4+
5+
```
6+
coder envs rebuild [environment_name] [flags]
7+
```
8+
9+
### Examples
10+
11+
```
12+
coder envs rebuild front-end-env --follow
13+
coder envs rebuild backend-env --force
14+
```
15+
16+
### Options
17+
18+
```
19+
--follow follow build log after initiating rebuild
20+
--force force rebuild without showing a confirmation prompt
21+
-h, --help help for rebuild
22+
```
23+
24+
### Options inherited from parent commands
25+
26+
```
27+
--user string Specify the user whose resources to target (default "me")
28+
-v, --verbose show verbose output
29+
```
30+
31+
### SEE ALSO
32+
33+
* [coder envs](coder_envs.md) - Interact with Coder environments
34+

docs/coder_envs_watch-build.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## coder envs watch-build
2+
3+
trail the build log of a Coder environment
4+
5+
```
6+
coder envs watch-build [environment_name] [flags]
7+
```
8+
9+
### Examples
10+
11+
```
12+
coder watch-build front-end-env
13+
```
14+
15+
### Options
16+
17+
```
18+
-h, --help help for watch-build
19+
```
20+
21+
### Options inherited from parent commands
22+
23+
```
24+
--user string Specify the user whose resources to target (default "me")
25+
-v, --verbose show verbose output
26+
```
27+
28+
### SEE ALSO
29+
30+
* [coder envs](coder_envs.md) - Interact with Coder environments
31+

internal/cmd/rebuild.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func rebuildEnvCommand() *cobra.Command {
2626
Args: cobra.ExactArgs(1),
2727
Example: `coder envs rebuild front-end-env --follow
2828
coder envs rebuild backend-env --force`,
29-
Hidden: true, // TODO(@cmoog) un-hide
3029
RunE: func(cmd *cobra.Command, args []string) error {
3130
ctx := cmd.Context()
3231
client, err := newClient()
@@ -44,7 +43,10 @@ coder envs rebuild backend-env --force`,
4443
IsConfirm: true,
4544
}).Run()
4645
if err != nil {
47-
return err
46+
return clog.Fatal(
47+
"failed to confirm prompt", clog.BlankLine,
48+
clog.Tipf(`use "--force" to rebuild without a confirmation prompt`),
49+
)
4850
}
4951
}
5052

@@ -65,7 +67,7 @@ coder envs rebuild backend-env --force`,
6567
},
6668
}
6769

68-
cmd.Flags().BoolVar(&follow, "follow", false, "follow buildlog after initiating rebuild")
70+
cmd.Flags().BoolVar(&follow, "follow", false, "follow build log after initiating rebuild")
6971
cmd.Flags().BoolVar(&force, "force", false, "force rebuild without showing a confirmation prompt")
7072
return cmd
7173
}
@@ -140,7 +142,6 @@ func watchBuildLogCommand() *cobra.Command {
140142
Example: "coder watch-build front-end-env",
141143
Short: "trail the build log of a Coder environment",
142144
Args: cobra.ExactArgs(1),
143-
Hidden: true, // TODO(@cmoog) un-hide
144145
RunE: func(cmd *cobra.Command, args []string) error {
145146
ctx := cmd.Context()
146147
client, err := newClient()

0 commit comments

Comments
 (0)