The version was overwritten to empty string

This commit is contained in:
2021-12-17 11:04:43 +01:00
parent 7adac3662e
commit a0e02af06e

View File

@@ -62,15 +62,14 @@ func main() {
if v, err := detectGitVersion(); err == nil { if v, err := detectGitVersion(); err == nil {
appVersion = v appVersion = v
helpMessageForAppversion = "The version of the application. " + helpMessageForAppversion = "The version of the application. " +
"If not set, the version will be detected from git. " + "If not set, the version will be detected from git."
"Detected version is: " + appVersion
} }
// flags // flags
flag.StringVar(&ChartsDir, "chart-dir", ChartsDir, "set the chart directory") flag.StringVar(&ChartsDir, "chart-dir", ChartsDir, "set the chart directory")
flag.StringVar(&ComposeFile, "compose", ComposeFile, "set the compose file to parse") 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(&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") version := flag.Bool("version", false, "show version and exit")
force := flag.Bool("force", false, "force the removal of the chart-dir") force := flag.Bool("force", false, "force the removal of the chart-dir")
flag.Parse() flag.Parse()