From 4486b6659640102dd542fea007f4c33ac02511ff Mon Sep 17 00:00:00 2001 From: s Date: Tue, 4 Nov 2025 11:06:35 -0500 Subject: feat: add version checking and auto-update functionality --- cmd/version.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 cmd/version.go (limited to 'cmd/version.go') diff --git a/cmd/version.go b/cmd/version.go new file mode 100644 index 0000000..bdb3331 --- /dev/null +++ b/cmd/version.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "fmt" + + "git.db.org.ai/dborg/internal/utils" + "github.com/spf13/cobra" +) + +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Print the version number of dborg", + Long: `Display the current version of the dborg CLI`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("dborg version %s\n", utils.Version) + }, +} + +func init() { + rootCmd.AddCommand(versionCmd) +} -- cgit v1.2.3