Skip to content

Commit 3729d97

Browse files
Added app version output
1 parent db9c646 commit 3729d97

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

cmd/docStreamer/main.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ import (
4040
"github.com/Percona-Lab/percona-docstreamer/internal/validator"
4141
)
4242

43+
// Declare the version variable.
44+
// The Makefile will override this value during build.
45+
var version = "1"
46+
4347
// --- Helper function for password prompt ---
4448
func getPassword(prompt string) (string, error) {
4549
fmt.Print(prompt)
@@ -63,10 +67,13 @@ func getConfirmation(prompt string) (bool, error) {
6367
}
6468

6569
var rootCmd = &cobra.Command{
66-
Use: "docStreamer",
67-
Short: "DocumentDB to MongoDB Migration and Sync Tool",
68-
Long: `docStreamer is a tool for performing a full load and continuous data
69-
capture (CDC) migration from AWS DocumentDB to MongoDB.`,
70+
Use: "docStreamer",
71+
Version: version,
72+
Short: "DocumentDB to MongoDB Migration and Sync Tool",
73+
Long: fmt.Sprintf(`docStreamer is a tool for performing a full load and continuous data
74+
capture (CDC) migration from AWS DocumentDB to MongoDB.
75+
76+
docStreamer %s `, version),
7077
CompletionOptions: cobra.CompletionOptions{
7178
DisableDefaultCmd: true,
7279
},

0 commit comments

Comments
 (0)