diff options
| author | s <[email protected]> | 2025-11-04 11:06:35 -0500 |
|---|---|---|
| committer | s <[email protected]> | 2025-11-04 11:06:35 -0500 |
| commit | 4486b6659640102dd542fea007f4c33ac02511ff (patch) | |
| tree | 3e991f3722e3b0062a6078078ff6aa1478c3ab00 /cmd/version.go | |
| parent | 3c06eede8ac8cb79272601aad3b2d3359657443a (diff) | |
| download | dborg-4486b6659640102dd542fea007f4c33ac02511ff.tar.gz dborg-4486b6659640102dd542fea007f4c33ac02511ff.zip | |
feat: add version checking and auto-update functionality
Diffstat (limited to 'cmd/version.go')
| -rw-r--r-- | cmd/version.go | 21 |
1 files changed, 21 insertions, 0 deletions
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) +} |
