mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-09 22:47:24 +00:00
buf: modify buf.yml, add buf generate (#5653)
This commit is contained in:
13
buf.gen.yaml
Normal file
13
buf.gen.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# The version of the generation template.
|
||||
# Required.
|
||||
# The only currently-valid value is v1beta1.
|
||||
version: v1beta1
|
||||
|
||||
# The plugins to run.
|
||||
plugins:
|
||||
# The name of the plugin.
|
||||
- name: gogofaster
|
||||
# The the relative output directory.
|
||||
out: proto
|
||||
# Any options to provide to the plugin.
|
||||
opt: Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,plugins=grpc,paths=source_relative
|
||||
@@ -2,20 +2,7 @@
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
|
||||
for dir in $proto_dirs; do
|
||||
buf protoc \
|
||||
-I "proto" \
|
||||
-I "third_party/proto" \
|
||||
--gogofaster_out=\
|
||||
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
|
||||
Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,\
|
||||
plugins=grpc,paths=source_relative:. \
|
||||
$(find "${dir}" -maxdepth 1 -name '*.proto')
|
||||
done
|
||||
|
||||
cp -r ./tendermint/* ./proto/*
|
||||
rm -rf tendermint
|
||||
buf generate --path proto/tendermint
|
||||
|
||||
mv ./proto/tendermint/abci/types.pb.go ./abci/types
|
||||
|
||||
|
||||
Reference in New Issue
Block a user