Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(cli): add --output={text,json} to version cmd #7010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 5, 2023
Prev Previous commit
Next Next commit
fixup! feat(cli): add --json output to version cmd
  • Loading branch information
johnstcn committed Apr 5, 2023
commit c8c610e1260c6c23488d2506926a9af815e09d4b
2 changes: 1 addition & 1 deletion cli/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (*RootCmd) version() *clibase.Cmd {
AGPL bool `json:"agpl"`
}{
Version: buildinfo.Version(),
BuildTime: buildTime.Format(time.UnixDate),
BuildTime: buildTime.Format(time.RFC3339),
ExternalURL: buildinfo.ExternalURL(),
Slim: buildinfo.IsSlim(),
AGPL: buildinfo.IsAGPL(),
Expand Down
2 changes: 1 addition & 1 deletion cli/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Full build of Coder, supports the server subcommand.
`
expectedJSON := `{
"version": "v0.0.0-devel",
"build_time": "Mon Jan 1 00:00:00 UTC 0001",
"build_time": "0001-01-01T00:00:00Z",
"external_url": "https://github.com/coder/coder",
"slim": false,
"agpl": false
Expand Down