From b6a721e78920791ae53ff49601a2f336bd598d4b Mon Sep 17 00:00:00 2001 From: johnhorsema Date: Sun, 23 Oct 2022 17:20:20 +0000 Subject: [PATCH 1/2] feat: Add version to the $ coder header in CLI --- cli/root.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/root.go b/cli/root.go index c40bd927e2b90..590fc92c5ce09 100644 --- a/cli/root.go +++ b/cli/root.go @@ -108,12 +108,13 @@ func AGPL() []*cobra.Command { } func Root(subcommands []*cobra.Command) *cobra.Command { + fmtLong := `Coder v%s — A tool for provisioning self-hosted development environments with Terraform. +` cmd := &cobra.Command{ Use: "coder", SilenceErrors: true, SilenceUsage: true, - Long: `Coder — A tool for provisioning self-hosted development environments with Terraform. -`, + Long: fmt.Sprintf(fmtLong, buildinfo.Version()), PersistentPreRun: func(cmd *cobra.Command, args []string) { if cliflag.IsSetBool(cmd, varNoVersionCheck) && cliflag.IsSetBool(cmd, varNoFeatureWarning) { From 84be5c752226ae6849bf1a59166801878a13a662 Mon Sep 17 00:00:00 2001 From: johnhorsema Date: Mon, 24 Oct 2022 03:26:21 +0000 Subject: [PATCH 2/2] fix: Remove additional v --- cli/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/root.go b/cli/root.go index 590fc92c5ce09..2682e164a48c5 100644 --- a/cli/root.go +++ b/cli/root.go @@ -108,7 +108,7 @@ func AGPL() []*cobra.Command { } func Root(subcommands []*cobra.Command) *cobra.Command { - fmtLong := `Coder v%s — A tool for provisioning self-hosted development environments with Terraform. + fmtLong := `Coder %s — A tool for provisioning self-hosted development environments with Terraform. ` cmd := &cobra.Command{ Use: "coder",