From 17ebe18b8baf8077bb5ce42b0e33ed3a486c74a8 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 24 Apr 2023 00:32:30 +0400 Subject: [PATCH] Store version in a var that is being passed as an arg of a compiler. --- cmd/dwelling-upload/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/dwelling-upload/main.go b/cmd/dwelling-upload/main.go index 94ddcb6..831ec5b 100644 --- a/cmd/dwelling-upload/main.go +++ b/cmd/dwelling-upload/main.go @@ -19,11 +19,13 @@ var configPath *string = flag.String("conf", "config.yaml", "path to configurati var logToStdout *bool = flag.Bool("log-stdout", false, "write logs to stdout") var showVersion *bool = flag.Bool("v", false, "show version") +var version string + func main() { flag.Parse() if *showVersion { - fmt.Println("dwelling-upload Ver. 23.10.0\nCopyright (c) 2022,2023 Alexander \"Arav\" Andreev ") + fmt.Println("dwelling-upload Ver. ", version, "\nCopyright (c) 2022,2023 Alexander \"Arav\" Andreev ") return }