From a0e02af06e7cb5b7616ab02676fae9b94217b042 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 17 Dec 2021 11:04:43 +0100 Subject: [PATCH] The version was overwritten to empty string --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index a9385db..5fd61b3 100644 --- a/main.go +++ b/main.go @@ -62,15 +62,14 @@ func main() { if v, err := detectGitVersion(); err == nil { appVersion = v helpMessageForAppversion = "The version of the application. " + - "If not set, the version will be detected from git. " + - "Detected version is: " + appVersion + "If not set, the version will be detected from git." } // flags flag.StringVar(&ChartsDir, "chart-dir", ChartsDir, "set the chart directory") flag.StringVar(&ComposeFile, "compose", ComposeFile, "set the compose file to parse") flag.StringVar(&AppName, "appname", helm.GetProjectName(), "set the helm chart app name") - flag.StringVar(&appVersion, "appversion", "", helpMessageForAppversion) + flag.StringVar(&appVersion, "appversion", appVersion, helpMessageForAppversion) version := flag.Bool("version", false, "show version and exit") force := flag.Bool("force", false, "force the removal of the chart-dir") flag.Parse()