From 082898fb45b3a2f9009bb52fc61551130ec4ec0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BE=E9=87=8C=28barry=29?= Date: Sat, 11 Jun 2022 18:00:48 +0800 Subject: [PATCH] fix: update config --- cmd/cmd.go | 2 +- cmd/config.go | 1 + protobuf.yaml | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 17a392c..a234b8c 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -122,7 +122,7 @@ func Main() { var data = "" var base = fmt.Sprintf("protoc -I %s -I %s", cfg.Vendor, pwd) - for i := range cfg.Root { + for i := range cfg.Includes { base += fmt.Sprintf(" -I %s", cfg.Root[i]) } var retagOut = "" diff --git a/cmd/config.go b/cmd/config.go index 924cfe1..f4269d8 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -5,6 +5,7 @@ type Cfg struct { Vendor string `yaml:"vendor,omitempty"` Checksum string `yaml:"checksum,omitempty" hash:"-"` Root []string `yaml:"root,omitempty" hash:"-"` + Includes []string `yaml:"includes,omitempty" hash:"-"` Depends []depend `yaml:"deps,omitempty"` Plugins []plugin `yaml:"plugins,omitempty" hash:"-"` changed bool diff --git a/protobuf.yaml b/protobuf.yaml index af92b97..68c4c48 100644 --- a/protobuf.yaml +++ b/protobuf.yaml @@ -1,8 +1,10 @@ version: v1 vendor: .proto -checksum: 0f7c5397b378b6024614c8edb8971e0c09a7b69f +checksum: 85da3b3146c7021097b973c086b0a12dae70c023 root: - proto +includes: +- proto deps: - name: google/protobuf url: /usr/local/include/google/protobuf