summaryrefslogtreecommitdiffstats
path: root/cmd/version.go
blob: bdb3331d696993dfb7cfefd4257da6740eeecd90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)
}