diff --git a/cmd/latestversion-get.go b/cmd/latestversion-get.go index 06a3031..aae6c0b 100644 --- a/cmd/latestversion-get.go +++ b/cmd/latestversion-get.go @@ -3,6 +3,7 @@ package cmd import ( "context" "fmt" + "strings" metadata_resolver "github.com/krafton-hq/version-helper/pkg/modules/metadata-resolver" meta_resolver_service "github.com/krafton-hq/version-helper/pkg/services/meta-resolver-service" @@ -26,7 +27,7 @@ func latestVersionGetCommand() *cobra.Command { Use: "get {namePrefix}", Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), Short: "최신 버전 조회 명령어", - Example: "latestversion get MapDLC", + Example: "latestversion get mapdlc", } cmd.Flags().VarP(enumflag.New(&ciHint, "CI 이름", meta_resolver_service.CiFlags, enumflag.EnumCaseInsensitive), @@ -82,7 +83,7 @@ func latestVersionGetCommand() *cobra.Command { return } - objName := namePrefix + "-" + repo + "-" + branch + objName := namePrefix + "-" + strings.ToLower(repo) + "-" + strings.ToLower(strings.ReplaceAll(branch, "/", "-")) ctx := context.Background() diff --git a/cmd/latestversion-update.go b/cmd/latestversion-update.go index ee3b52f..5be53ac 100644 --- a/cmd/latestversion-update.go +++ b/cmd/latestversion-update.go @@ -31,7 +31,7 @@ func latestVersionUpdateCommand() *cobra.Command { Use: "update {namePrefix} {version}", Args: cobra.MatchAll(cobra.ExactArgs(2), cobra.OnlyValidArgs), Short: "최신 버전 추가 또는 업데이트 명령어", - Example: "latestversion update MapDLC abc123", + Example: "latestversion update mapdlc abc123", } cmd.Flags().VarP(enumflag.New(&ciHint, "CI 이름", meta_resolver_service.CiFlags, enumflag.EnumCaseInsensitive), @@ -89,11 +89,11 @@ func latestVersionUpdateCommand() *cobra.Command { return } - objName := namePrefix + "-" + repo + "-" + branch + objName := namePrefix + "-" + strings.ToLower(repo) + "-" + strings.ToLower(strings.ReplaceAll(branch, "/", "-")) ctx := context.Background() - labels["branch"] = strings.ReplaceAll(branch, "/", "-") + labels["branch"] = strings.ToLower(strings.ReplaceAll(branch, "/", "-")) labels["repository"] = repo lv := &redfoxV1alpha1.LatestVersion{