Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! make
  • Loading branch information
ammario committed Feb 23, 2023
commit ff0446e2b840938a2e4635800ed094587e46c8d8
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# coder

Coder v0.0.0-devel — A tool for provisioning self-hosted development environments with Terraform.
Coder — A tool for provisioning self-hosted development environments with Terraform.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/coder_templates_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Specify the directory to create from, use '-' to read tar from stdin
<br/>
| | |
| --- | --- |
| Default | <code>/home/coder/coder</code> |
| Default | <code><current-directory></code> |

### --parameter-file

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/coder_templates_push.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Specify the directory to create from, use '-' to read tar from stdin
<br/>
| | |
| --- | --- |
| Default | <code>/home/coder/coder</code> |
| Default | <code><current-directory></code> |

### --name

Expand Down
13 changes: 13 additions & 0 deletions scripts/clidocgen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

_ "embed"

"github.com/coder/coder/buildinfo"
"github.com/coder/flog"
)

Expand Down Expand Up @@ -105,6 +106,18 @@ func writeCommand(w io.Writer, cmd *cobra.Command) error {
return err
}
content := stripansi.Strip(b.String())

// Remove the version and its right space, since during this script running
// there is no build info available
content = strings.ReplaceAll(content, buildinfo.Version()+" ", "")

// Remove references to the current working directory
dir, err := os.Getwd()
if err != nil {
return err
}
content = strings.ReplaceAll(content, dir, "<current-directory>")

_, err = w.Write([]byte(content))
return err
}
Expand Down