Skip to content

Commit

Permalink
[META-10490] latestversion branch data to lower
Browse files Browse the repository at this point in the history
  • Loading branch information
bokang1990 committed Nov 2, 2023
1 parent 05fe704 commit 927b4e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cmd/latestversion-get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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),
Expand Down Expand Up @@ -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()

Expand Down
6 changes: 3 additions & 3 deletions cmd/latestversion-update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 927b4e3

Please sign in to comment.