Skip to content

Commit

Permalink
cmd/gf: fix missing configuration file support for cli command `pack/…
Browse files Browse the repository at this point in the history
…run/tpl/up` (#3629)
  • Loading branch information
hailaz authored Jun 4, 2024
1 parent bd8d046 commit e3a00d7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/gf/internal/cmd/cmd_pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func init() {
}

type cPackInput struct {
g.Meta `name:"pack"`
g.Meta `name:"pack" config:"gfcli.pack"`
Src string `name:"SRC" arg:"true" v:"required" brief:"{cPackSrcBrief}"`
Dst string `name:"DST" arg:"true" v:"required" brief:"{cPackDstBrief}"`
Name string `name:"name" short:"n" brief:"{cPackNameBrief}"`
Expand Down
2 changes: 1 addition & 1 deletion cmd/gf/internal/cmd/cmd_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func init() {

type (
cRunInput struct {
g.Meta `name:"run"`
g.Meta `name:"run" config:"gfcli.run"`
File string `name:"FILE" arg:"true" brief:"{cRunFileBrief}" v:"required"`
Path string `name:"path" short:"p" brief:"{cRunPathBrief}" d:"./"`
Extra string `name:"extra" short:"e" brief:"{cRunExtraBrief}"`
Expand Down
2 changes: 1 addition & 1 deletion cmd/gf/internal/cmd/cmd_tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gf tpl parse -p ./template -v values.json -o ./template.parsed

type (
cTplParseInput struct {
g.Meta `name:"parse" brief:"{cTplParseBrief}" eg:"{cTplParseEg}"`
g.Meta `name:"parse" config:"gfcli.tpl.parse" brief:"{cTplParseBrief}" eg:"{cTplParseEg}"`
Path string `name:"path" short:"p" brief:"template file or folder path" v:"required"`
Pattern string `name:"pattern" short:"n" brief:"template file pattern when path is a folder, default is:*" d:"*"`
Recursive bool `name:"recursive" short:"c" brief:"recursively parsing files if path is folder, default is:true" d:"true"`
Expand Down
2 changes: 1 addition & 1 deletion cmd/gf/internal/cmd/cmd_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func init() {
}

type cUpInput struct {
g.Meta `name:"up" config:"gfcli.up"`
g.Meta `name:"up" config:"gfcli.up"`
All bool `name:"all" short:"a" brief:"upgrade both version and cli, auto fix codes" orphan:"true"`
Cli bool `name:"cli" short:"c" brief:"also upgrade CLI tool" orphan:"true"`
Fix bool `name:"fix" short:"f" brief:"auto fix codes(it only make sense if cli is to be upgraded)" orphan:"true"`
Expand Down

0 comments on commit e3a00d7

Please # to comment.