Skip to content

Commit

Permalink
feat: add branch flag for the kcl mod add command
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <xpf6677@163.com>
  • Loading branch information
Peefy committed May 27, 2024
1 parent f10084a commit 86f0299
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/kcl/commands/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var (
git string
tag string
commit string
branch string
target string
rename string
noSumCheck bool
Expand Down
4 changes: 3 additions & 1 deletion cmd/kcl/commands/mod_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ func NewModAddCmd(cli *client.KpmClient) *cobra.Command {
SilenceUsage: true,
}

cmd.Flags().StringVar(&git, "git", "", "git repository location")
cmd.Flags().StringVar(&git, "git", "", "git repository url")
cmd.Flags().StringVar(&tag, "tag", "", "git repository tag")
cmd.Flags().StringVar(&commit, "commit", "", "git repository commit")
cmd.Flags().StringVar(&branch, "branch", "", "git repository branch")
cmd.Flags().StringVar(&rename, "rename", "", "rename the dependency")
cmd.Flags().BoolVarP(&quiet, "quiet", "q", false, "quiet (no output)")
cmd.Flags().BoolVar(&noSumCheck, "no_sum_check", false, "do not check the checksum of the package and update kcl.mod.lock")
Expand Down Expand Up @@ -130,6 +131,7 @@ func parseAddOptions(cli *client.KpmClient, localPath string, args []string) (*o
Url: git,
Tag: tag,
Commit: commit,
Branch: branch,
},
},
NoSumCheck: noSumCheck,
Expand Down

0 comments on commit 86f0299

Please sign in to comment.