mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 00:04:15 -04:00
Update to use the latest protobuf package to build pb (#5193)
* Update to use the latest protobuf package to build pb The pb package was generated some time ago with old version of https://github.com/golang/protobuf which was deprecated and in favor of google.golang.org/protobuf (see deprecation notice in https://pkg.go.dev/github.com/golang/protobuf) This PR updates the generation of pb package with v1.27.1 of google.golang.org/protobuf. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Exclude pb from import test Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -2,11 +2,18 @@
|
||||
# from: https://github.com/golang/protobuf to make this work.
|
||||
# The generate dns.pb.go is checked into git, so for normal builds we don't need
|
||||
# to run this generation step.
|
||||
# Note: The following has been used when regenerate pb:
|
||||
# curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
|
||||
# go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
|
||||
# go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0
|
||||
# export PATH="$PATH:$(go env GOPATH)/bin"
|
||||
# rm pb/dns.pb.go pb/dns_grpc.pb.go
|
||||
# make pb
|
||||
|
||||
all: dns.pb.go
|
||||
|
||||
dns.pb.go: dns.proto
|
||||
protoc --go_out=plugins=grpc:. dns.proto
|
||||
protoc --go_out=. --go-grpc_out=. dns.proto
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user