Skip to content

Commit

Permalink
fix: barry 2024-09-21 02:14:16
Browse files Browse the repository at this point in the history
  • Loading branch information
kooksee committed Sep 20, 2024
1 parent a5e654b commit 6059f10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/protobuild/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ func Main() *cli.Command {
defer recovery.Exit()

var protoList sync.Map
basePlugin := cfg.BasePlugin
for i := range cfg.Root {
if pathutil.IsNotExist(cfg.Root[i]) {
log.Printf("file %s not found", cfg.Root[i])
Expand Down Expand Up @@ -210,6 +209,7 @@ func Main() *cli.Command {
}))
}

basePlugin := cfg.BasePlugin
protoList.Range(func(key, _ interface{}) bool {
in := key.(string)

Expand All @@ -224,6 +224,9 @@ func Main() *cli.Command {
reTagOpt := ""
for i := range cfg.Plugins {
plg := cfg.Plugins[i]
if plg.SkipRun {
continue
}

name := plg.Name

Expand Down
3 changes: 3 additions & 0 deletions cmd/protobuild/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ type plugin struct {
// SkipBase skip base config
SkipBase bool `yaml:"skip_base,omitempty"`

// SkipRun skip run plugin
SkipRun bool `yaml:"skip_run,omitempty"`

// ExcludeOpts exclude plugin opts
ExcludeOpts pluginOpts `yaml:"exclude_opts,omitempty"`
Opt pluginOpts `yaml:"opt,omitempty"`
Expand Down

0 comments on commit 6059f10

Please sign in to comment.