chore(version): Get the version following how katenary is installed

This commit is contained in:
2024-11-26 16:47:37 +01:00
parent e13653fba1
commit 441be30720
3 changed files with 24 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ func buildRootCmd() *cobra.Command {
}
rootCmd.Example = ` katenary convert -c docker-compose.yml -o ./charts`
rootCmd.Version = generator.Version
rootCmd.Version = generator.GetVersion()
rootCmd.CompletionOptions.DisableDescriptions = false
rootCmd.CompletionOptions.DisableNoDescFlag = false
@@ -233,7 +233,7 @@ func generateVersionCommand() *cobra.Command {
Use: "version",
Short: "Print the version number of Katenary",
Run: func(cmd *cobra.Command, args []string) {
println(generator.Version)
println(generator.GetVersion())
},
}
}