From 4582fed1ccef6bdaa40f17c3a2985f92bedb90b3 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 19 Jul 2021 18:44:02 +0100 Subject: [PATCH] cmd/ghcs/main: Add `--version` flag - This is built into Cobra the argument parser. Now `ghcs --version` exists. - When we prepare to bump the version, we need to remember to update this value else the Homebrew formula, GitHub releases and the `ghcs --version` output will be mismatched. - Fixes https://github.com/github/ghcs/issues/16. --- cmd/ghcs/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/ghcs/main.go b/cmd/ghcs/main.go index 400f5324c..6270b6fac 100644 --- a/cmd/ghcs/main.go +++ b/cmd/ghcs/main.go @@ -16,9 +16,10 @@ func main() { } var rootCmd = &cobra.Command{ - Use: "ghcs", - Short: "Codespaces", - Long: "Codespaces", + Use: "ghcs", + Short: "Codespaces", + Long: "Codespaces", + Version: "0.5.0", } func Execute() {