Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "latest-version", Short: "Get latest version of a Helm chart from a repository", Aliases: []string{"lv"}, Args: cobra.NoArgs, Run: func(c *cobra.Command, args []string) { if strings.HasPrefix(FlagRepo, "oci://") { ociURL := FlagRepo + "/" + FlagChart version, err := helm_utils.GetLatestVersionFromOCI(ociURL) error_utils.HandleError(err, "Error getting latest version from OCI registry") fmt.Println(version) return } repoName := FlagRepo if strings.HasPrefix(FlagRepo, "http://") || strings.HasPrefix(FlagRepo, "https://") { name, err := helm_utils.GetRepoNameFromURL(FlagRepo) error_utils.HandleError(err, "Error finding repository by URL") repoName = name } version, err := helm_utils.GetLatestVersionFromRepo(repoName, FlagChart) error_utils.HandleError(err, "Error getting latest version from repository") fmt.Println(version) }, }
View Source
var FlagChart string
View Source
var FlagRepo string
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.