From fd04e3979291517d748277d388a729fbebd758f9 Mon Sep 17 00:00:00 2001 From: varoOP <46842159+varoOP@users.noreply.github.com> Date: Wed, 20 Sep 2023 14:00:10 +0530 Subject: [PATCH] feat: add version command --- cmd/shinkrodb/main.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/shinkrodb/main.go b/cmd/shinkrodb/main.go index 0de5057..12da613 100644 --- a/cmd/shinkrodb/main.go +++ b/cmd/shinkrodb/main.go @@ -9,6 +9,12 @@ import ( "github.com/varoOP/shinkrodb/internal/domain" ) +var ( + version = "dev" + commit = "" + date = "" +) + func main() { cfg := config.NewConfig() var rootPath string @@ -29,6 +35,11 @@ func main() { am.Get(path.Join(rootPath, "tmdb-mal-master.yaml")) domain.CreateMapping(am, path.Join(rootPath, "tmdb-mal.yaml")) + case "version": + fmt.Printf("shinkrodb: %v\n", version) + fmt.Printf("Commit: %v\n", commit) + fmt.Printf("Build Date: %v\n", date) + default: fmt.Println("ERROR: no command specified") }